From 0a17a2d4cfcb76ea20022d4462c6db4bb5c4715e Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Thu, 15 Aug 2013 12:58:31 +0200 Subject: [PATCH] Handle content in non escaped ATOM feeds --- autoblogs/autoblog.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/autoblogs/autoblog.php b/autoblogs/autoblog.php index a2aff27..660aafa 100644 --- a/autoblogs/autoblog.php +++ b/autoblogs/autoblog.php @@ -379,9 +379,12 @@ class VroumVroum_Blog { $date = isset($item->published) ? (string) $item->published : (string) $item->updated; $guid = !empty($item->id) ? (string)$item->id : (string)$item->link['href']; - + + if( count($item->content->children()) > 0 ) $content = (string)$item->content->asXML(); + else $content = (string)$item->content; + $id = $this->insertOrUpdateArticle($guid, (string)$item->title, - (string)$item->link['href'], strtotime($date), (string)$item->content); + (string)$item->link['href'], strtotime($date), $content ); if ($id !== false) $updated++;