HTML Purifier is a standards-compliant HTML filter library written in PHP. HTML Purifier will remove all malicious code (efficient filtering of XSS scripts) with a thoroughly audited, secure yet permissive whitelist.
Quick Install
1 2 3 4 5 6 | <?php require_once '/path/to/htmlpurifier/library/HTMLPurifier.auto.php'; $purifier = new HTMLPurifier(); $clean_html = $purifier->purify($dirty_html); ?> |
View Before-After XSS Filtering
Download HTML Purfier :
(More Info at: http://htmlpurifier.org/)







