mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-22 06:41:29 +00:00
Reverts most of be60340. Implements a simplier solution using XPath to get the proper title tag from a feed item.
This commit is contained in:
@@ -51,14 +51,10 @@ class FeedItem_RSS extends FeedItem_Common {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_title() {
|
function get_title() {
|
||||||
$titles = $this->elem->getElementsByTagName("title");
|
$title = $this->xpath->query("title", $this->elem)->item(0);
|
||||||
|
|
||||||
foreach ($titles as $title) {
|
if ($title) {
|
||||||
$nv = trim($title->nodeValue);
|
return trim($title->nodeValue);
|
||||||
|
|
||||||
if (!empty($nv)) {
|
|
||||||
return $nv;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user