'; function getFormMethod() { return (isset($_REQUEST['post'])) ? 'post' : 'get'; } if (empty($_REQUEST['strict'])) { ?> HTML Purifier Live Demo

HTML Purifier Live Demo

50000) { ?>

Request exceeds maximum allowed text size of 50kb.

set('Core', 'TidyFormat', !empty($_REQUEST['tidy'])); $config->set('HTML', 'Strict', !empty($_REQUEST['strict'])); $purifier = new HTMLPurifier($config); $pure_html = $purifier->purify($html); ?>

Here is your purified HTML:

Valid XHTML 1.0 Transitional

Here is the source code of the purified HTML:

If you would like to validate the code with W3C's validator, copy and paste the entire demo page's source.

Welcome to the live demo. Enter some HTML and see how HTML Purifier will filter it.

HTML Purifier Input ()

Warning: GET request method can only hold 8129 characters (probably less depending on your browser). If you need to test anything larger than that, try the POST form.

Nicely format output with Tidy? />
XHTML 1.0 Strict output? />
Serve as application/xhtml+xml? (not for IE) />

Return to HTML Purifier's home page. Try the form in GET and POST request flavors (GET is easy to validate with W3C, but POST allows larger inputs).