From 96ce71f35f2dd5bd08e140ffbe47e8fe40ec0c01 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 15 May 2013 23:06:56 +0400 Subject: [PATCH] atom parser: experimental fix for feeds which do not encode entry content --- classes/feeditem/atom.php | 7 +++++++ 1 file changed, 7 insertions(+) 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; } } -- 2.39.5