Commit bb5e69bc authored by catch's avatar catch
Browse files

Issue #3204929 by longwave, donquixote, andypost: Html::load() inconsistent...

Issue #3204929 by longwave, donquixote, andypost: Html::load() inconsistent space removal with old libxml2 versions

(cherry picked from commit d8d13be9)
parent a6797350
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -286,7 +286,7 @@ public static function load($html) {

    $dom = new \DOMDocument();
    // Ignore warnings during HTML soup loading.
    @$dom->loadHTML($document);
    @$dom->loadHTML($document, LIBXML_NOBLANKS);

    return $dom;
  }
+1 −0
Original line number Diff line number Diff line
@@ -870,6 +870,7 @@ nmsgstr
nntp
noaccess
noadd
noblanks
nocache
nocase
nocdata
+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ protected function parse() {
      // DOM can load HTML soup. But, HTML soup can throw warnings, suppress
      // them.
      $html_dom = new \DOMDocument();
      @$html_dom->loadHTML('<?xml encoding="UTF-8">' . $this->getRawContent());
      @$html_dom->loadHTML('<?xml encoding="UTF-8">' . $this->getRawContent(), LIBXML_NOBLANKS);
      if ($html_dom) {
        // It's much easier to work with simplexml than DOM, luckily enough
        // we can just simply import our DOM tree.