From 1874c8d6dfd15b5517e10a29082b224d5e597216 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 23 May 2013 20:32:54 +0400 Subject: [PATCH] feedparser: properly handle nodeValue of rss channel link element (closes #692) --- classes/feedparser.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/classes/feedparser.php b/classes/feedparser.php index 6b84e59c..a4fb348a 100644 --- a/classes/feedparser.php +++ b/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"); -- 2.39.5