]> git.wh0rd.org Git - tt-rss.git/commitdiff
use saveHTML() in sanitize instead of saveXML() (refs #522)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sun, 17 Mar 2013 13:02:59 +0000 (17:02 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sun, 17 Mar 2013 13:02:59 +0000 (17:02 +0400)
include/functions.php

index c8b3bbb907d85cf78538518d6c2a4ddd8849112d..6e48a700a5e99761af69e74ac6171c5ea5103d9e 100644 (file)
                        }
                }
 
-               $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';