FIX: SUPPLIER_PROPOSAL_FREE_TEXT get HTML tags removed

This commit is contained in:
Brice Werry 2024-12-23 10:42:11 +01:00
parent bf2137089f
commit 45b6941344

View file

@ -195,8 +195,11 @@ if ($action == 'set') {
dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON", $value, 'chaine', 0, '', $conf->entity);
} elseif (preg_match('/set_(.*)/', $action, $reg)) {
$code = $reg[1];
if ($code == "SUPPLIER_PROPOSAL_FREE_TEXT") {
$value = (GETPOST($code,'restricthtml') ? GETPOST($code,'restricthtml') : 1);
} else {
$value = (GETPOST($code) ? GETPOST($code) : 1);
}
$res = dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity);
if (!($res > 0)) {
$error++;