fixHTML

 <?php
function fixHTML($html) {
    libxml_use_internal_errors(true);
    $doc = new DOMDocument();
    $doc->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
    libxml_clear_errors();
    return $doc->saveHTML();
}

 ?>

----------------------------------------------------------------------

<?=fixHTML(htmlspecialchars_decode(stripslashes($a['body']))) ?>

Comments

Popular posts from this blog

How to Turn Off Ads in uTorrent

Disable browser caching using a PHP header.