An alternative to php tidy?

laukok picture laukok · Jul 31, 2011 · Viewed 16.3k times · Source

I use php tidy to process html input in my database,

$fragment = tidy_repair_string($dom->saveHTML(), array('output-xhtml'=>1,'show-body-only'=>1));

I have this php_tidy turned on in my server but my live server doesn't support tidy,

Fatal error: Call to undefined function tidy_repair_string() in /customers/0/5/a/mysite.com/httpd.www/models/functions.php on line 587

Any alternative can I have to fix this problem?

Answer

Justin picture Justin · Dec 2, 2011

I found htmLawed to be very fast. I found it when looking for an alternative to HTMLPurifier, which was very slow.