From 8b468e94a8dcf076fdd0b7c8d6e34a5d225eadfa Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Tue, 9 Aug 2016 17:02:45 +0200 Subject: [PATCH] [AtomFormat] Use XML encoding instead of CDATA section --- formats/AtomFormat.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formats/AtomFormat.php b/formats/AtomFormat.php index d72e8b75..b71b15c7 100644 --- a/formats/AtomFormat.php +++ b/formats/AtomFormat.php @@ -28,7 +28,7 @@ class AtomFormat extends FormatAbstract{ $entryUri = is_null($data->uri) ? '' : $this->xml_encode($data->uri); $entryTimestamp = is_null($data->timestamp) ? '' : $this->xml_encode(date(DATE_ATOM, $data->timestamp)); // We prevent content from closing the CDATA too early. - $entryContent = is_null($data->content) ? '' : 'sanitizeHtml(str_replace(']]>','',$data->content)) . ']]>'; + $entryContent = is_null($data->content) ? '' : $this->xml_encode($this->sanitizeHtml($data->content)); $entries .= <<