diff --git a/core/htmlsanitizer.class.inc.php b/core/htmlsanitizer.class.inc.php
index fa952bb99..7388deddf 100644
--- a/core/htmlsanitizer.class.inc.php
+++ b/core/htmlsanitizer.class.inc.php
@@ -1,4 +1,20 @@
/**
* Base class for all possible implementations of HTML Sanitization
*/
@@ -207,6 +223,13 @@ class HTMLDOMSanitizer extends HTMLSanitizer
{
$this->oDoc = new DOMDocument();
$this->oDoc->preserveWhitespace = true;
+
+ // MS outlook implements empty lines by the mean of
+ // 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);
+
@$this->oDoc->loadHTML(''.$sHTML); // For loading HTML chunks where the character set is not specified
$this->CleanNode($this->oDoc);