]> git.wh0rd.org Git - tt-rss.git/commitdiff
feedparser: make content:encoded take precedence over description
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 2 May 2013 06:30:41 +0000 (10:30 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 2 May 2013 06:30:41 +0000 (10:30 +0400)
classes/feeditem/rss.php

index 5b43d0e8c2fee659329d9e6838135b2886a9cdfa..2f363b4f69d343ef98936a830702b0f7c88eca5b 100644 (file)
@@ -35,18 +35,17 @@ class FeedItem_RSS extends FeedItem_Common {
        }
 
        function get_content() {
-               $content = $this->elem->getElementsByTagName("description")->item(0);
+               $content = $this->xpath->query("content:encoded", $this->elem)->item(0);
 
                if ($content) {
                        return $content->nodeValue;
                }
 
-               $content = $this->xpath->query("content:encoded", $this->elem)->item(0);
+               $content = $this->elem->getElementsByTagName("description")->item(0);
 
                if ($content) {
                        return $content->nodeValue;
                }
-
        }
 
        function get_description() {