diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 4a6e3a42f01..1291d954e2a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -7646,7 +7646,7 @@ function dol_string_onlythesehtmlattributes($stringtoclean, $allowed_attributes $stringtoclean = ''.$stringtoclean.''; // Warning: loadHTML does not support HTML5 on old libxml versions. - $dom = new DOMDocument(null, 'UTF-8'); + $dom = new DOMDocument('', 'UTF-8'); $dom->loadHTML($stringtoclean, LIBXML_ERR_NONE | LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD | LIBXML_NONET | LIBXML_NOWARNING | LIBXML_NOXMLDECL); if ($dom instanceof DOMDocument) {