Support » Plugin: Gallery Custom Links » incorrect “loadHtml”

  • 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" "http://www.w3.org/TR/REC-html40/loose.dtd">
    <html><body>...
Viewing 3 replies - 1 through 3 (of 3 total)
  • 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 11 months, 3 weeks ago by Jordy Meow.

    thank

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