mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 19:55:55 +00:00
better support for atom content type xhtml
This commit is contained in:
@@ -41,9 +41,8 @@ class FeedItem_Atom extends FeedItem_Common {
|
||||
$content = $this->elem->getElementsByTagName("content")->item(0);
|
||||
|
||||
if ($content) {
|
||||
if ($content->hasChildNodes()) {
|
||||
|
||||
if ($content->getElementsByTagName("*")->length > 1) {
|
||||
if ($content->hasAttribute('type')) {
|
||||
if ($content->getAttribute('type') == 'xhtml') {
|
||||
return $this->doc->saveXML($content->firstChild->nextSibling);
|
||||
}
|
||||
}
|
||||
@@ -53,13 +52,20 @@ class FeedItem_Atom extends FeedItem_Common {
|
||||
}
|
||||
|
||||
function get_description() {
|
||||
$summary = $this->elem->getElementsByTagName("summary")->item(0);
|
||||
$content = $this->elem->getElementsByTagName("summary")->item(0);
|
||||
|
||||
if ($summary) {
|
||||
return $summary->nodeValue;
|
||||
if ($content) {
|
||||
if ($content->hasAttribute('type')) {
|
||||
if ($content->getAttribute('type') == 'xhtml') {
|
||||
return $this->doc->saveXML($content->firstChild->nextSibling);
|
||||
}
|
||||
}
|
||||
|
||||
return $content->nodeValue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function get_categories() {
|
||||
$categories = $this->elem->getElementsByTagName("category");
|
||||
$cats = array();
|
||||
|
||||
Reference in New Issue
Block a user