php 7.4 DOMDocument::loadHTML(): Tag figure invalid in Entity


  • | 138 points

    I getting this error in wordpress,

    Warning: DOMDocument::loadHTML(): Tag figure invalid in Entity

    $post->loadHTML(mb_convert_encoding($the_content, 'HTML-ENTITIES', 'UTF-8'));

    I have the extension mbstring enabled. I read that I might need php-xml7.4 but that doesn't appear in the extension.

    Is there a place to download extensions?

    Thanks


  • | 138 points

    @rgfx I fix this myself by doing this.

    libxml_use_internal_errors(true);
    $post = new DOMDocument('1.0', 'UTF-8');
    $post->loadHTML(mb_convert_encoding($the_content, 'HTML-ENTITIES', 'UTF-8'));

Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.