diff --git a/api/src/Mail/Html.php b/api/src/Mail/Html.php
index ee582a620d..9f134cdd89 100644
--- a/api/src/Mail/Html.php
+++ b/api/src/Mail/Html.php
@@ -500,9 +500,12 @@ class Html
LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD | LIBXML_NOBLANKS
))
{
+ // do not sent possible xml errors in buffer further otherwise it may get caught as et2 template error in Widget
+ libxml_clear_errors();
// Failed to parse
return $html;
}
+
$dom->normalizeDocument();
foreach(array('ol','ul') as $list_type)
@@ -531,6 +534,9 @@ class Html
}
$dom->removeChild($dom->firstChild);
+ // do not sent possible xml errors in buffer further otherwise it may get caught as et2 template error in Widget
+ libxml_clear_errors();
+
return $dom->saveHTML();
}