Skip to content
Snippets Groups Projects
Commit d8d13be9 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
parent 71f0e1de
No related branches found
No related tags found
No related merge requests found
...@@ -286,7 +286,7 @@ public static function load($html) { ...@@ -286,7 +286,7 @@ public static function load($html) {
$dom = new \DOMDocument(); $dom = new \DOMDocument();
// Ignore warnings during HTML soup loading. // Ignore warnings during HTML soup loading.
@$dom->loadHTML($document); @$dom->loadHTML($document, LIBXML_NOBLANKS);
return $dom; return $dom;
} }
......
...@@ -870,6 +870,7 @@ nmsgstr ...@@ -870,6 +870,7 @@ nmsgstr
nntp nntp
noaccess noaccess
noadd noadd
noblanks
nocache nocache
nocase nocase
nocdata nocdata
......
...@@ -125,7 +125,7 @@ protected function parse() { ...@@ -125,7 +125,7 @@ protected function parse() {
// DOM can load HTML soup. But, HTML soup can throw warnings, suppress // DOM can load HTML soup. But, HTML soup can throw warnings, suppress
// them. // them.
$html_dom = new \DOMDocument(); $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) { if ($html_dom) {
// It's much easier to work with simplexml than DOM, luckily enough // It's much easier to work with simplexml than DOM, luckily enough
// we can just simply import our DOM tree. // we can just simply import our DOM tree.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment