using System; using System.Collections.Generic; using System.Text; namespace New_College.Common.Helper { public static class ClearHtmlHelper { public static string SHTML(string html) { if (!string.IsNullOrWhiteSpace(html)) { html = html.Trim(); html = html.Replace(@"/]*?>(.*?)<\/script>/si", ""); //html = html.Replace(@"/]*?>(.*?)<\/style>/si", ""); html = html.Replace("\t", ""); html = html.Replace("\r\n", ""); html = html.Replace("\r", ""); html = html.Replace("\n", ""); html = html.Replace(" ", ""); html = html.Replace(" ", ""); } //html=html.Replace("",""); return html; } } }