'; function getFormMethod() { return (isset($_REQUEST['post'])) ? 'post' : 'get'; } if (empty($_REQUEST['strict'])) { ?>
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:
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 HTMLPurifier will filter it.
Return to HTMLPurifier's home page. Try the form in GET and POST request flavors (GET is easy to validate with W3C, but POST allows larger inputs).