Usage
$purifier = new HTMLPurifier();
$clean_html = $purifier->purify( $dirty_html );
HTML Purifier Live Demo
http://hp.jpsband.org/live/docs/examples/demo.phpReference
HTML Purifier - Filter your HTML the standards-compliant way!http://hp.jpsband.org/
via
phpspot開発日誌 - HTMLを許可しつつXSS対策を行えるPHPライブラリ「HTML Purifier」http://phpspot.org/blog/archives/2007/03/htmlxssphphtml.html