From 5879968e600a6ed74a48e89cf8fda63f55013bb1 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Tue, 23 Sep 2025 18:15:40 +0200 Subject: [PATCH] Clean code --- htdocs/core/class/doleditor.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index 800471ad2a6..adb474cb416 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -207,7 +207,10 @@ class DolEditor $fullpage = false; - $extraAllowedContent = 'a[target];section[contenteditable,id];div{background-color,color,display,float,height,margin,margin-top,margin-bottom,padding,width,border-top-left-radius,border-top-right-radius,border-bottom-left-radius,border-bottom-right-radius,box-shadow}'; + $extraAllowedContent = 'a[target];'; + $extraAllowedContent .= 'section[contenteditable,id];'; + $extraAllowedContent .= 'div{background-color,color,display,float,height,margin,margin-top,margin-bottom,padding,width,border-top-left-radius,border-top-right-radius,border-bottom-left-radius,border-bottom-right-radius,box-shadow}'; + if (is_string($restrictContent)) { $extraAllowedContent = $restrictContent; }