From bf2137089f056b9a1a52c851e338ffbdc8ee6579 Mon Sep 17 00:00:00 2001 From: Brice Werry Date: Mon, 23 Dec 2024 10:31:17 +0100 Subject: [PATCH 1/3] FIX: SUPPLIER_PROPOSAL_FREE_TEXT get HTML tags removed --- htdocs/admin/supplier_proposal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index b296f65a8769e..02fc5bdaccbcb 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -195,7 +195,7 @@ dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON", $value, 'chaine', 0, '', $conf->entity); } elseif (preg_match('/set_(.*)/', $action, $reg)) { $code = $reg[1]; - $value = (GETPOST($code) ? GETPOST($code) : 1); + $value = (GETPOST($code,'restricthtml') ? GETPOST($code,'restricthtml') : 1); $res = dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity); if (!($res > 0)) { From 45b6941344ea72d4dd3c34a63a5a0e685d74cdaa Mon Sep 17 00:00:00 2001 From: Brice Werry Date: Mon, 23 Dec 2024 10:42:11 +0100 Subject: [PATCH 2/3] FIX: SUPPLIER_PROPOSAL_FREE_TEXT get HTML tags removed --- htdocs/admin/supplier_proposal.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index 02fc5bdaccbcb..0d49aabbef624 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -195,8 +195,11 @@ 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++; From 6ae79f5ec4b4233092bac6223d492ca8eeb3e15d Mon Sep 17 00:00:00 2001 From: Brice Werry Date: Mon, 23 Dec 2024 10:47:07 +0100 Subject: [PATCH 3/3] FIX: SUPPLIER_PROPOSAL_FREE_TEXT get HTML tags removed --- htdocs/admin/supplier_proposal.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index 0d49aabbef624..51422388cd4d3 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -196,9 +196,9 @@ } elseif (preg_match('/set_(.*)/', $action, $reg)) { $code = $reg[1]; if ($code == "SUPPLIER_PROPOSAL_FREE_TEXT") { - $value = (GETPOST($code,'restricthtml') ? GETPOST($code,'restricthtml') : 1); + $value = (GETPOST($code, 'restricthtml') ? GETPOST($code, 'restricthtml') : 1); } else { - $value = (GETPOST($code) ? GETPOST($code) : 1); + $value = (GETPOST($code) ? GETPOST($code) : 1); } $res = dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity); if (!($res > 0)) {