DTCMS清除 &

DTcms.Common\Utils.cs

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

中的

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

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

            Htmlstring = Regex.Replace(Htmlstring, @"&emsp;", "", RegexOptions.IgnoreCase);
            Htmlstring = Regex.Replace(Htmlstring, @"&amp;", "", RegexOptions.IgnoreCase);
            Htmlstring = Regex.Replace(Htmlstring, @"emsp;", "", RegexOptions.IgnoreCase);

 

posted @ 2015-12-10 16:52  请叫我七哥  阅读(455)  评论(0)    收藏  举报