public string CleanHtml(object Html) {
	var s = Html.ToString();
	var b = new StringBuilder();
...

C# C# HTML Encoding

by GateKiller, March 05, 2009 15:08, 6 refactorings, tagged with html, C#, sanitize

This is my own attempt at w...

98c852e2d9b26249745ea92c72964d3f Talk
private static Regex _tags = new Regex("<[^>]*(>|$)",
    RegexOptions.Singleline | RegexOptions.ExplicitCapture | RegexOptions.Compiled);
private static Regex _whitelist = new Regex(@"
...

C# Sanitize HTML

by Jeff Atwood, June 20, 2008 08:24, 64 refactorings, tagged with html, xss, sanitize

Takes a provided HTML strin...

51d623f33f8b83095db84ff35e15dbe8 Talk