]> git.wh0rd.org Git - tt-rss.git/commitdiff
feedparser: properly handle nodeValue of rss channel link element (closes #692)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 23 May 2013 16:32:54 +0000 (20:32 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 23 May 2013 16:32:54 +0000 (20:32 +0400)
classes/feedparser.php

index 6b84e59c787362759694b64268947934fea359d6..a4fb348a21b07d643490292554695ca253573c8b 100644 (file)
@@ -114,8 +114,11 @@ class FeedParser {
 
                                $link = $xpath->query("//channel/link")->item(0);
 
-                               if ($link && $link->hasAttributes()) {
-                                       $this->link = $link->getAttribute("href");
+                               if ($link) {
+                                       if ($link->getAttribute("href"))
+                                               $this->link = $link->getAttribute("href");
+                                       else if ($link->nodeValue)
+                                               $this->link = $link->nodeValue;
                                }
 
                                $articles = $xpath->query("//channel/item");