1 2 3 4
public string CleanHtml(object Html) { var s = Html.ToString(); var b = new StringBuilder(); ...
1 2 3 4
private static Regex _tags = new Regex("<[^>]*(>|$)", RegexOptions.Singleline | RegexOptions.ExplicitCapture | RegexOptions.Compiled); private static Regex _whitelist = new Regex(@" ...
C# Sanitize HTML
Takes a provided HTML strin...
This is my own attempt at w...