[BUGFIX] allow to load unclean html without exception

fixes #754
This commit is contained in:
Kay Strobach 2017-03-29 10:08:11 +02:00 committed by GitHub
parent 4decaffd53
commit 33f1619d0f

View File

@ -58,9 +58,8 @@ class Html
// Load DOM
$dom = new \DOMDocument();
$dom->preserveWhiteSpace = true;
$dom->loadXML($html);
$dom->loadHTML($html, LIBXML_NOWARNING);
$node = $dom->getElementsByTagName('body');
self::parseNode($node->item(0), $element);
}