Skip to content

Commit

Permalink
Fix email incorrect format.
Browse files Browse the repository at this point in the history
  • Loading branch information
corentin-soriano committed Nov 26, 2024
1 parent 8f6705a commit 6c4b144
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sources/main.functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -4313,11 +4313,12 @@ function sendMailToUser(
global $SETTINGS;
$emailSettings = new EmailSettings($SETTINGS);
$emailService = new EmailService();
$antiXss = new AntiXSS();

// Sanitize inputs
$post_receipt = filter_var($post_receipt, FILTER_SANITIZE_EMAIL);
$post_subject = htmlspecialchars($post_subject, ENT_QUOTES, 'UTF-8');
$post_body = htmlspecialchars($post_body, ENT_QUOTES, 'UTF-8');
$post_subject = $antiXss->xss_clean($post_subject);
$post_body = $antiXss->xss_clean($post_body);

if (count($post_replace) > 0) {
$post_body = str_replace(
Expand Down

0 comments on commit 6c4b144

Please sign in to comment.