• Resolved Тони К

    (@catloki)


    Hi! (PHP 7.1, WP 5.03)

    function linkify (in file mgcl_core.php)

    $html->loadHtml( $buffer, 0 );

    need to fix on

    $html->loadHtml( $buffer, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD );

    otherwise:

    <div class="entry-content clearfix"><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "https://www.w3.org/TR/REC-html40/loose.dtd">
    <html><body>...
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Тони К

    (@catloki)

    P.S. I’m sorry, I know english bad

    Plugin Author Jordy Meow

    (@tigroumeow)

    Hi,

    Yes, you are right, that’s what I was doing before but unfortunately those constants don’t exist on former versions of PHP and I went for the easy way.

    Anyway, I will use this code from now ??

    if ( defined( 'LIBXML_HTML_NOIMPLIED' ) && defined( 'LIBXML_HTML_NODEFDTD' ) )
      $html->loadHtml( $buffer, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD );
    else
      $html->loadHtml( $buffer, 0 );
    • This reply was modified 6 years, 1 month ago by Jordy Meow.
    Thread Starter Тони К

    (@catloki)

    thank

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘incorrect “loadHtml”’ is closed to new replies.