Question

I'm trying to set some configurations for HTMLPurifier, and everything works on my dev machine, but on test, it fails.

with the error Class 'HTMLPurifier_config' not found. but if I remove config, it runs no problem. I'm using HTMLPurifier 4.0.0

$config=HTMLPurifier_config::createDefault();
$config->set('AutoFormat','AutoParagraph', true);
$config->set('AutoFormat','Linkify', true);

$purifier = new HTMLPurifier($config);

I am loading HTMLPurifier with HTMLPurifier.auto.php, but as I said, this is working in dev, but not testing.

Was it helpful?

Solution

config needs to be capitalized.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top