标签:
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);
标签:
原文地址:http://www.cnblogs.com/qigege/p/5036563.html