2
0
forked from Wavyzz/dolibarr

Fix GETPOST with restricthtml

This commit is contained in:
Laurent Destailleur
2021-07-07 01:45:31 +02:00
parent 9d010f6d10
commit ff94c60cc7
2 changed files with 4 additions and 4 deletions

View File

@@ -779,7 +779,7 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options =
do {
$oldstringtoclean = $out;
if (!empty($conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML) && $check != 'restricthtmlallowunvalid') {
if (!empty($out) && !empty($conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML) && $check != 'restricthtmlallowunvalid') {
try {
$dom = new DOMDocument;
$dom->loadHTML($out, LIBXML_ERR_NONE|LIBXML_HTML_NOIMPLIED|LIBXML_HTML_NODEFDTD|LIBXML_NONET|LIBXML_NOWARNING|LIBXML_NOXMLDECL);