Fix "html" type extrafields now accept some html balises with the flag "htmlrestricted" inside the "GETPOST"

This commit is contained in:
Maximilien Rozniecki 2023-05-19 11:36:53 +02:00
parent d97a891f6c
commit 726ca61776

View file

@ -2306,6 +2306,11 @@ class ExtraFields
$value_arr = GETPOST($keysuffix."options_".$key.$keyprefix);
$value_key = $value_arr;
}
} elseif (in_array($key_type, array('html'))) {
if (!GETPOSTISSET($keysuffix."options_".$key.$keyprefix)) {
continue; // Value was not provided, we should not set it.
}
$value_key = dol_htmlcleanlastbr(GETPOST($keysuffix."options_".$key.$keyprefix, 'restricthtml'));
} else {
if (!GETPOSTISSET($keysuffix."options_".$key.$keyprefix)) {
continue; // Value was not provided, we should not set it.