diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/HTMLParser.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/HTMLParser.php b/src/HTMLParser.php index 5d02d05..0b407ae 100644 --- a/src/HTMLParser.php +++ b/src/HTMLParser.php @@ -626,7 +626,7 @@ class HTMLParser continue; } // Discard nodes with less than 25 characters, without blank space - if (mb_strlen($node->getValue(true)) < 25) { + if (mb_strlen($node->getTextContent(true)) < 25) { continue; } @@ -641,10 +641,10 @@ class HTMLParser $contentScore = 1; // Add points for any commas within this paragraph. - $contentScore += count(explode(',', $node->getValue(true))); + $contentScore += count(explode(',', $node->getTextContent(true))); // For every 100 characters in this paragraph, add another point. Up to 3 points. - $contentScore += min(floor(mb_strlen($node->getValue(true)) / 100), 3); + $contentScore += min(floor(mb_strlen($node->getTextContent(true)) / 100), 3); // Initialize and score ancestors. /** @var Readability $ancestor */ |