From: Andrew Dolgov Date: Sun, 17 Mar 2013 13:02:59 +0000 (+0400) Subject: use saveHTML() in sanitize instead of saveXML() (refs #522) X-Git-Tag: 1.7.5~145 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=18f24d8e4cf70c8bf70839250f242461fd9453ba;p=tt-rss.git use saveHTML() in sanitize instead of saveXML() (refs #522) --- diff --git a/include/functions.php b/include/functions.php index c8b3bbb9..6e48a700 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2595,9 +2595,10 @@ } } - $node = $doc->getElementsByTagName('body')->item(0); + //$node = $doc->getElementsByTagName('body')->item(0); - $res = $doc->saveXML($node, LIBXML_NOEMPTYTAG); + $doc->removeChild($doc->firstChild); //remove doctype + $res = $doc->saveHTML(); $config = array('safe' => 1, 'deny_attribute' => 'style, width, height, class, id', 'comment' => 1, 'cdata' => 1, 'balance' => 0); $spec = 'img=width,height';