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

php - get vimeo video id from url

Hosting a Laravel 11 project on cPanel shared hosting