From: zaikos Date: Wed, 14 Jan 2015 18:28:58 +0000 (-0500) Subject: Made FeedItem_RSS::get_title() more aggresive in finding an article title. X-Git-Tag: 16.3~383^2^2~1 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=be60340c296637fc269bf53adff4910911219db0;p=tt-rss.git Made FeedItem_RSS::get_title() more aggresive in finding an article title. --- 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; + } } }