Clear xml errors in buffer after using xml in Mail otherwise it may get caught wrongly further in etemplate widget

This commit is contained in:
Hadi Nategh 2021-06-04 11:19:11 +02:00
parent f3912eccd8
commit 134aa92712

View File

@ -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();
}