您的位置:首页 > 其它

DTCMS清除 &

2015-12-10 16:52 316 查看
DTcms.Common\Utils.cs

#region 清除HTML标记
public static string DropHTML(string Htmlstring)


中的

      Htmlstring.Replace("<", "");
Htmlstring.Replace(">", "");
Htmlstring.Replace("\r\n", "");
Htmlstring.Replace(" ", "");


中的 Htmlstring.Replace(" ", ""); 改为

Htmlstring = Regex.Replace(Htmlstring, @" ", "", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"&", "", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"emsp;", "", RegexOptions.IgnoreCase);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: