From: Andrew Dolgov Date: Wed, 15 May 2013 19:06:56 +0000 (+0400) Subject: atom parser: experimental fix for feeds which do not encode entry content X-Git-Tag: 1.8~106 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=96ce71f35f2dd5bd08e140ffbe47e8fe40ec0c01;p=tt-rss.git atom parser: experimental fix for feeds which do not encode entry content --- diff --git a/classes/feeditem/atom.php b/classes/feeditem/atom.php index b981dc31..1cfa4bcc 100644 --- a/classes/feeditem/atom.php +++ b/classes/feeditem/atom.php @@ -41,6 +41,13 @@ class FeedItem_Atom extends FeedItem_Common { $content = $this->elem->getElementsByTagName("content")->item(0); if ($content) { + if ($content->hasChildNodes()) { + + if ($content->getElementsByTagName("*")->length > 1) { + return $this->doc->saveXML($content->firstChild->nextSibling); + } + } + return $content->nodeValue; } }