From 99b82567944a96afb70ab7af1f0bd344ac3ab95a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 2 May 2013 10:30:41 +0400 Subject: [PATCH] feedparser: make content:encoded take precedence over description --- classes/feeditem/rss.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/classes/feeditem/rss.php b/classes/feeditem/rss.php index 5b43d0e8..2f363b4f 100644 --- a/classes/feeditem/rss.php +++ b/classes/feeditem/rss.php @@ -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() { -- 2.39.5