summaryrefslogtreecommitdiff
path: root/classes/feedparser.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2014-03-04 16:38:04 +0400
committerAndrew Dolgov <[email protected]>2014-03-04 16:38:04 +0400
commit31bd6f7643bf139802a224f4584caca3cbbcc9b8 (patch)
tree1b042a485937c850aa40919ba2b2bcff8fb65e50 /classes/feedparser.php
parent4ce778677ef16353d5b0b8342a29bd65575310f5 (diff)
parser: trim some some feed-extracted data link titles and links
Diffstat (limited to 'classes/feedparser.php')
-rw-r--r--classes/feedparser.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/classes/feedparser.php b/classes/feedparser.php
index 187875b5f..239fdb7a6 100644
--- a/classes/feedparser.php
+++ b/classes/feedparser.php
@@ -205,6 +205,10 @@ class FeedParser {
break;
}
+
+ if ($this->title) $this->title = trim($this->title);
+ if ($this->link) $this->link = trim($this->link);
+
} else {
if( !isset($this->error) ){
$this->error = "Unknown/unsupported feed type";
@@ -252,7 +256,7 @@ class FeedParser {
foreach ($links as $link) {
if (!$rel || $link->hasAttribute('rel') && $link->getAttribute('rel') == $rel) {
- array_push($rv, $link->getAttribute('href'));
+ array_push($rv, trim($link->getAttribute('href')));
}
}
break;
@@ -261,7 +265,7 @@ class FeedParser {
foreach ($links as $link) {
if (!$rel || $link->hasAttribute('rel') && $link->getAttribute('rel') == $rel) {
- array_push($rv, $link->getAttribute('href'));
+ array_push($rv, trim($link->getAttribute('href')));
}
}
break;