Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

Commit

Permalink
Fixing Bug: htmlspecialchars_decode should be executed for the report…
Browse files Browse the repository at this point in the history
…s if sent as html
  • Loading branch information
Jako committed Mar 20, 2014
1 parent 0448020 commit 5738f4c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions assets/snippets/eform/eform.inc.php
Expand Up @@ -506,7 +506,7 @@ function eForm($modx,$params) {
$modx->mail->From = $from;
$modx->mail->FromName = $fromname;
$modx->mail->Subject = $subject;
$modx->mail->Body = ($isHtml) ? $report : htmlspecialchars_decode($report, ENT_QUOTES);
$modx->mail->Body = (!$isHtml) ? $report : htmlspecialchars_decode($report, ENT_QUOTES);
AddAddressToMailer($modx->mail,"replyto",$replyto);
AddAddressToMailer($modx->mail,"to",$to);
AddAddressToMailer($modx->mail,"cc",$cc);
Expand All @@ -523,7 +523,7 @@ function eForm($modx,$params) {
$modx->mail->From = $from;
$modx->mail->FromName = $fromname;
$modx->mail->Subject = $subject;
$modx->mail->Body = ($isHtml) ? $report : htmlspecialchars_decode($report, ENT_QUOTES);
$modx->mail->Body = (!$isHtml) ? $report : htmlspecialchars_decode($report, ENT_QUOTES);
AddAddressToMailer($modx->mail,"to",$firstEmail);
AttachFilesToMailer($modx->mail,$attachments);
if(!$modx->mail->send()) return 'CCSender: ' . $_lang['ef_mail_error'] . $modx->mail->ErrorInfo;
Expand All @@ -540,7 +540,7 @@ function eForm($modx,$params) {
$modx->mail->From = ($autosender)? $autosender:$from;
$modx->mail->FromName = ($autoSenderName)?$autoSenderName:$fromname;
$modx->mail->Subject = $subject;
$modx->mail->Body = ($isHtml) ? $autotext : htmlspecialchars_decode($autotext, ENT_QUOTES);
$modx->mail->Body = (!$isHtml) ? $autotext : htmlspecialchars_decode($autotext, ENT_QUOTES);
AddAddressToMailer($modx->mail,"to",$firstEmail);
if(!$modx->mail->send()) return 'AutoText: ' . $_lang['ef_mail_error'] . $modx->mail->ErrorInfo;
$modx->mail->ClearAllRecipients();
Expand All @@ -555,7 +555,7 @@ function eForm($modx,$params) {
$modx->mail->From = $from;
$modx->mail->FromName = $fromname;
$modx->mail->Subject = $subject;
$modx->mail->Body = ($isHtml) ? $mobiletext : htmlspecialchars_decode($mobiletext, ENT_QUOTES);
$modx->mail->Body = (!$isHtml) ? $mobiletext : htmlspecialchars_decode($mobiletext, ENT_QUOTES);
AddAddressToMailer($modx->mail,"to",$mobile);
$modx->mail->send();
$modx->mail->ClearAllRecipients();
Expand Down

0 comments on commit 5738f4c

Please sign in to comment.