Made FeedItem_RSS::get_title() more aggresive in finding an article title.
This commit is contained in:
parent
50547484b4
commit
be60340c29
1 changed files with 7 additions and 3 deletions
|
@ -51,10 +51,14 @@ class FeedItem_RSS extends FeedItem_Common {
|
|||
}
|
||||
|
||||
function get_title() {
|
||||
$title = $this->elem->getElementsByTagName("title")->item(0);
|
||||
$titles = $this->elem->getElementsByTagName("title");
|
||||
|
||||
if ($title) {
|
||||
return trim($title->nodeValue);
|
||||
foreach ($titles as $title) {
|
||||
$nv = trim($title->nodeValue);
|
||||
|
||||
if (!empty($nv)) {
|
||||
return $nv;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue