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

C# C# HTML Encoding

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

This is my own attempt at w...

98c852e2d9b26249745ea92c72964d3f Talk
1
2
3
4
#!/usr/bin/php
<?php
/**
...

PHP HTML Filter

by grom, October 23, 2008 23:00, 5 refactorings, tagged with php, html, parser, sanitize

Only allow subset of HTML. ...

A14537020ec5b11fea3b956353724860 Talk
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

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

Takes a provided HTML strin...

51d623f33f8b83095db84ff35e15dbe8 Talk