feedparser: xpath doesn't properly query for title element if there's a default namespace so let's add a separate ugly hack for rdf:RDF feeds, thanks for that xml dipshits
This commit is contained in:
parent
94238b143a
commit
206326c219
1 changed files with 8 additions and 0 deletions
|
@ -56,6 +56,14 @@ class FeedItem_RSS extends FeedItem_Common {
|
||||||
if ($title) {
|
if ($title) {
|
||||||
return trim($title->nodeValue);
|
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() {
|
function get_content() {
|
||||||
|
|
Loading…
Reference in a new issue