feedparser: make content:encoded take precedence over description

This commit is contained in:
Andrew Dolgov 2013-05-02 10:30:41 +04:00
parent f4ae0f053b
commit 99b8256794
1 changed files with 5 additions and 6 deletions

View File

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