summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Readability.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Readability.php b/src/Readability.php
index cfd3c44..2027db3 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -639,7 +639,7 @@ class Readability
$node = $article;
while ($node) {
- if ($node->parentNode && in_array($node->tagName, ['div', 'section']) && !($node->hasAttribute('id') && strpos($node->getAttribute('id'), 'readability') === 0)) {
+ if ($node->parentNode && in_array($node->nodeName, ['div', 'section']) && !($node->hasAttribute('id') && strpos($node->getAttribute('id'), 'readability') === 0)) {
if ($node->isElementWithoutContent()) {
$node = NodeUtility::removeAndGetNext($node);
continue;