]> git.wh0rd.org - tt-rss.git/blobdiff - classes/feedparser.php
Merge pull request #386 from wolfgangasdf/master
[tt-rss.git] / classes / feedparser.php
index 187875b5f9cbf380d70147454ace75ddc3409917..239fdb7a69b0c14cb17b4dbd40b96da755291850 100644 (file)
@@ -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;