Browse Source

atom parser: experimental fix for feeds which do not encode entry content

Andrew Dolgov 7 years ago
parent
commit
96ce71f35f
1 changed files with 7 additions and 0 deletions
  1. 7 0
      classes/feeditem/atom.php

+ 7 - 0
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;
 		}
 	}