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 22aa437..877cea9 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -343,7 +343,7 @@ class Readability
'twitter:title'
], array_keys($values)));
- $this->setTitle(isset($values[$key]) ? $values[$key] : null);
+ $this->setTitle(isset($values[$key]) ? trim($values[$key]) : null);
if (!$this->getTitle()) {
$this->setTitle($this->getArticleTitle());
@@ -468,7 +468,7 @@ class Readability
return null;
}
- $curTitle = trim($originalTitle);
+ $curTitle = $originalTitle = trim($originalTitle);
$titleHadHierarchicalSeparators = false;
/*