From 726ca61776fcbed54a63ac606db296458631dcc2 Mon Sep 17 00:00:00 2001 From: Maximilien Rozniecki Date: Fri, 19 May 2023 11:36:53 +0200 Subject: [PATCH] Fix "html" type extrafields now accept some html balises with the flag "htmlrestricted" inside the "GETPOST" --- htdocs/core/class/extrafields.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 5c44e140be9..b110f0a4a16 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -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.