public static string FilterAll(string content) { content = TextFilter.FilterHtml(content); content = TextFilter.FilterScript(content); content = TextFilter.FilterAHrefScript(content); content = TextFilter.FilterObject(content); content = TextFilter.FilterIframe(content); content = TextFilter.FilterFrameset(content); content = TextFilter.FilterSrc(content); content = TextFilter.FilterBadWords(content); return(content); }
public static string Process(FilterType filterType, string filterContent) { switch (filterType) { case FilterType.Script: filterContent = TextFilter.FilterScript(filterContent); return(filterContent); case FilterType.Html: filterContent = TextFilter.FilterHtml(filterContent); return(filterContent); case FilterType.Object: filterContent = TextFilter.FilterObject(filterContent); return(filterContent); case FilterType.AHrefScript: filterContent = TextFilter.FilterAHrefScript(filterContent); return(filterContent); case FilterType.Iframe: filterContent = TextFilter.FilterIframe(filterContent); return(filterContent); case FilterType.Frameset: filterContent = TextFilter.FilterFrameset(filterContent); return(filterContent); case FilterType.Src: filterContent = TextFilter.FilterSrc(filterContent); return(filterContent); case FilterType.BadWords: filterContent = TextFilter.FilterBadWords(filterContent); return(filterContent); case FilterType.Sql: case FilterType.Html | FilterType.BadWords: case FilterType.Script | FilterType.Html | FilterType.BadWords: case FilterType.AHrefScript | FilterType.BadWords: case FilterType.Script | FilterType.AHrefScript | FilterType.BadWords: case FilterType.Html | FilterType.AHrefScript | FilterType.BadWords: case FilterType.Script | FilterType.Html | FilterType.AHrefScript | FilterType.BadWords: return(filterContent); case FilterType.All: filterContent = TextFilter.FilterAll(filterContent); return(filterContent); default: return(filterContent); } }