diff --git a/Masuit.Tools/Html/HtmlHelper.cs b/Masuit.Tools/Html/HtmlHelper.cs index 6242fee..fe35ca3 100644 --- a/Masuit.Tools/Html/HtmlHelper.cs +++ b/Masuit.Tools/Html/HtmlHelper.cs @@ -302,37 +302,37 @@ namespace Masuit.Tools.Html /// ///3.1清除HTML标记 /// - ///包括HTML的源码 + ///包括HTML的源码 ///已经去除后的文字 - public static string RemoveHtml(this string Htmlstring) + public static string RemoveHtml(this string htmlstring) { //删除脚本 - Htmlstring = Regex.Replace(Htmlstring, @"]*?>.*?", "", RegexOptions.IgnoreCase); + htmlstring = Regex.Replace(htmlstring, @"]*?>.*?", "", RegexOptions.IgnoreCase); //删除HTML Regex regex = new Regex("<.+?>", RegexOptions.IgnoreCase); - Htmlstring = regex.Replace(Htmlstring, ""); - Htmlstring = Regex.Replace(Htmlstring, @"<(.[^>]*)>", "", RegexOptions.IgnoreCase); - Htmlstring = Regex.Replace(Htmlstring, @"([\r\n])[\s]+", "", RegexOptions.IgnoreCase); - Htmlstring = Regex.Replace(Htmlstring, @"-->", "", RegexOptions.IgnoreCase); - Htmlstring = Regex.Replace(Htmlstring, @"", "", RegexOptions.IgnoreCase); + htmlstring = Regex.Replace(htmlstring, @"