summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2016-11-11 16:35:53 +0000
committerAndres Rey <[email protected]>2016-11-11 16:35:53 +0000
commit0bfa43b77b23b65e3fb272ba4d293dc8cdfe046a (patch)
treee33ba1aa6a0020fe0d3d890ed8b96b31dd540f22 /src
parenta657e7121385e776c5dfee94fcd388fa487b2d40 (diff)
Creating readability object on the first child (a div/domelement) instead of the DOMDocument
Diffstat (limited to 'src')
-rw-r--r--src/HTMLParser.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/HTMLParser.php b/src/HTMLParser.php
index 7248da6..22e85f9 100644
--- a/src/HTMLParser.php
+++ b/src/HTMLParser.php
@@ -404,6 +404,7 @@ class HTMLParser
$topCandidate->firstChild->appendChild($import);
}
+ // Readability must be created using firstChild to grab de DOMElement instead of the DOMDocument.
$topCandidate = new Readability($topCandidate->firstChild);
$topCandidate->initializeNode();