feedparser: make content:encoded take precedence over description
This commit is contained in:
parent
f4ae0f053b
commit
99b8256794
|
@ -35,18 +35,17 @@ class FeedItem_RSS extends FeedItem_Common {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_content() {
|
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);
|
$content = $this->xpath->query("content:encoded", $this->elem)->item(0);
|
||||||
|
|
||||||
if ($content) {
|
if ($content) {
|
||||||
return $content->nodeValue;
|
return $content->nodeValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$content = $this->elem->getElementsByTagName("description")->item(0);
|
||||||
|
|
||||||
|
if ($content) {
|
||||||
|
return $content->nodeValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_description() {
|
function get_description() {
|
||||||
|
|
Loading…
Reference in New Issue