]> git.wh0rd.org Git - tt-rss.git/commitdiff
feedparser: xpath doesn't properly query for title element if there's a default names...
authorAndrew Dolgov <noreply@fakecake.org>
Mon, 19 Jan 2015 18:40:20 +0000 (21:40 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Mon, 19 Jan 2015 18:40:20 +0000 (21:40 +0300)
classes/feeditem/rss.php

index 7b4c4fb0c6775cc2bb7ed7d369340fec401e8f58..27a364b812b90bb708b09b7f24d2e0803e06c40a 100644 (file)
@@ -56,6 +56,14 @@ class FeedItem_RSS extends FeedItem_Common {
                if ($title) {
                        return trim($title->nodeValue);
                }
+
+               // if the document has a default namespace then querying for
+               // title would fail because of reasons so let's try the old way
+               $title = $this->elem->getElementsByTagName("title")->item(0);
+
+               if ($title) {
+                       return trim($title->nodeValue);
+               }
        }
 
        function get_content() {