summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-17 17:02:59 +0400
committerAndrew Dolgov <[email protected]>2013-03-17 17:02:59 +0400
commit18f24d8e4cf70c8bf70839250f242461fd9453ba (patch)
treee7c3d651226b2d5e583314954dfc7669f83ebe4b
parentcf2f643edb0a74da8b7f80fda3070843f1dd4cc0 (diff)
use saveHTML() in sanitize instead of saveXML() (refs #522)
-rw-r--r--include/functions.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/functions.php b/include/functions.php
index c8b3bbb90..6e48a700a 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';