diff --git a/core/htmlsanitizer.class.inc.php b/core/htmlsanitizer.class.inc.php index b5235cc4d..b1076cfdf 100644 --- a/core/htmlsanitizer.class.inc.php +++ b/core/htmlsanitizer.class.inc.php @@ -261,7 +261,7 @@ class HTMLDOMSanitizer extends HTMLSanitizer // We have to transform that into


(which is how Thunderbird implements empty lines) // Unfortunately, DOMDocument::loadHTML does not take the tag namespaces into account (once loaded there is no way to know if the tag did have a namespace) // therefore we have to do the transformation upfront - $sHTML = preg_replace('@\s*@', '
', $sHTML); + $sHTML = preg_replace('@(\s| )*@', '
', $sHTML); @$this->oDoc->loadHTML(''.$sHTML); // For loading HTML chunks where the character set is not specified