summaryrefslogtreecommitdiff
path: root/src/Readability.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Readability.php')
-rw-r--r--src/Readability.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Readability.php b/src/Readability.php
index c7c3d50..3f4d807 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -447,7 +447,7 @@ class Readability
return null;
}
- $curTitle = $originalTitle;
+ $curTitle = trim($originalTitle);
$titleHadHierarchicalSeparators = false;
/*
@@ -825,7 +825,7 @@ class Readability
while ($next) {
// If we've hit another <br><br>, we're done adding children to this <p>.
if ($next->nodeName === 'br') {
- $nextElem = NodeUtility::nextElement($next);
+ $nextElem = NodeUtility::nextElement($next->nextSibling);
if ($nextElem && $nextElem->nodeName === 'br') {
break;
}