Ver código fonte

feedparser: properly handle nodeValue of rss channel link element (closes #692)

Andrew Dolgov 11 anos atrás
pai
commit
1874c8d6df
1 arquivos alterados com 5 adições e 2 exclusões
  1. 5 2
      classes/feedparser.php

+ 5 - 2
classes/feedparser.php

@@ -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");