From e68076b8f16973e4735ec9249dfe45da094ddac6 Mon Sep 17 00:00:00 2001 From: atm-lena Date: Tue, 21 Mar 2023 13:34:22 +0100 Subject: [PATCH] Add better protect --- htdocs/core/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 0924e95e8ed..e6f38d50da2 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -7483,7 +7483,7 @@ function dol_textishtml($msg, $option = 0) return true; } elseif (preg_match('/<\/textarea/i', $msg)) { return true; - } elseif (preg_match('/<(b|em|i|u)[^>]*>/i', $msg)) { + } elseif (preg_match('/<(b|em|i|u)(\s*[^>]+)?>/i', $msg)) { return true; } elseif (preg_match('/
]*>/i', $msg)) { + } elseif (preg_match('/<(b|em|i|u)(\s*[^>]+)?>/i', $msg)) { return true; } elseif (preg_match('//i', $msg)) { return true;