Skip to content

Commit

Permalink
use PHP built-in stripslashes since 8.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
leemyongpakvn committed Dec 15, 2023
1 parent c90b6f0 commit deaa49d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contactform.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}' => '',
];
Expand Down

0 comments on commit deaa49d

Please sign in to comment.