]> git.wh0rd.org - tt-rss.git/commitdiff
atom parser: experimental fix for feeds which do not encode entry content
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 15 May 2013 19:06:56 +0000 (23:06 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 15 May 2013 19:06:56 +0000 (23:06 +0400)
classes/feeditem/atom.php

index b981dc319cdd175de1533f75e28cd7ed59de7552..1cfa4bcc5829718a644078170d32608f8e4152f9 100644 (file)
@@ -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;
                }
        }