mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-14 21:41:23 +01:00
Avoid to obfuscate attributes with html tags inside
This commit is contained in:
@@ -775,13 +775,15 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options =
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'restricthtml': // Recommended for most html textarea
|
case 'restricthtml': // Recommended for most html textarea
|
||||||
$out = dol_string_onlythesehtmltags($out, 0, 1, 1);
|
do {
|
||||||
|
$oldstringtoclean = $out;
|
||||||
// We should also exclude non expected attributes
|
$out = dol_string_onlythesehtmltags($out, 0, 1, 1);
|
||||||
if (!empty($conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES)) {
|
|
||||||
$out = dol_string_onlythesehtmlattributes($out);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// We should also exclude non expected attributes
|
||||||
|
if (!empty($conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES)) {
|
||||||
|
$out = dol_string_onlythesehtmlattributes($out);
|
||||||
|
}
|
||||||
|
} while ($oldstringtoclean != $out);
|
||||||
break;
|
break;
|
||||||
case 'custom':
|
case 'custom':
|
||||||
if (empty($filter)) {
|
if (empty($filter)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user