From be60340c296637fc269bf53adff4910911219db0 Mon Sep 17 00:00:00 2001 From: zaikos Date: Wed, 14 Jan 2015 13:28:58 -0500 Subject: [PATCH] Made FeedItem_RSS::get_title() more aggresive in finding an article title. --- classes/feeditem/rss.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/classes/feeditem/rss.php b/classes/feeditem/rss.php index c9a7467c..0e2b77ac 100644 --- a/classes/feeditem/rss.php +++ b/classes/feeditem/rss.php @@ -51,10 +51,14 @@ class FeedItem_RSS extends FeedItem_Common { } function get_title() { - $title = $this->elem->getElementsByTagName("title")->item(0); + $titles = $this->elem->getElementsByTagName("title"); - if ($title) { - return trim($title->nodeValue); + foreach ($titles as $title) { + $nv = trim($title->nodeValue); + + if (!empty($nv)) { + return $nv; + } } } -- 2.39.5