PHP & HTML Purifier error: Undefined variable: dirty_html

Posted by TaG on Stack Overflow See other posts from Stack Overflow or by TaG
Published on 2010-03-30T12:29:49Z Indexed on 2010/03/30 12:33 UTC
Read the original article Hit count: 455

Filed under:
|

I'm trying to install HTML Purifier http://htmlpurifier.org/ but I get the following error Undefined variable: dirty_html. I was wondering how can I fix this problem?

Here is the PHP code.

 require_once '../../htmlpurifier/library/HTMLPurifier.auto.php';

 $config = HTMLPurifier_Config::createDefault();
 $config->set('Core.Encoding', 'UTF-8'); // replace with your encoding
 $config->set('HTML.Doctype', 'XHTML 1.0 Strict'); // replace with your doctype
 $purifier = new HTMLPurifier($config);

 $clean_html = $purifier->purify($dirty_html);

© Stack Overflow or respective owner

Related posts about php

Related posts about htmlpurifier