/ Published in: PHP

Cleans up HTML using tidy. Returns only part. Set show-body-only to false if you want full document.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function tidy_html($html) { 'clean' => true, 'output-xhtml' => true, 'show-body-only' => true, 'word-2000' => true, 'show-body-only' => true, ); $tidy = new tidy(); $tidy->parseString($html, $tidy_config, 'utf8'); $tidy->cleanRepair(); }
Comments
