From deaa49d21b5fe69eb6845b4eeb8a12995ac3b5ad Mon Sep 17 00:00:00 2001 From: leemyong pakvn <3759923+leemyongpakvn@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:08:55 +0700 Subject: [PATCH] use PHP built-in stripslashes since 8.0.0 --- contactform.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contactform.php b/contactform.php index 5611496..61169b5 100644 --- a/contactform.php +++ b/contactform.php @@ -567,12 +567,13 @@ public function sendMessage() && empty($mailAlreadySend) && ($sendConfirmationEmail || $sendNotificationEmail) ) { + $message = version_compare(_PS_VERSION_, '8.0.0', '>=') ? stripslashes($message) : Tools::stripslashes($message); $var_list = [ '{firstname}' => '', '{lastname}' => '', '{order_name}' => '-', '{attached_file}' => '-', - '{message}' => Tools::nl2br(Tools::htmlentitiesUTF8(Tools::stripslashes($message))), + '{message}' => Tools::nl2br(Tools::htmlentitiesUTF8($message)), '{email}' => $from, '{product_name}' => '', ];