diff --git a/lib/Mailer/Methods/AmazonSES.php b/lib/Mailer/Methods/AmazonSES.php index 5c3a918cdc..be4160a5ce 100644 --- a/lib/Mailer/Methods/AmazonSES.php +++ b/lib/Mailer/Methods/AmazonSES.php @@ -62,7 +62,7 @@ class AmazonSES { $response = ($response) ? $response->Error->Message->__toString() : sprintf(__('%s has returned an unknown error.', 'mailpoet'), Mailer::METHOD_AMAZONSES); - $response .= sprintf(' %s: %s', __('Unprocessed subscriber', 'mailpoet'), $subscriber); + $response .= sprintf(' %s: %s', __('Unprocessed subscriber', 'mailpoet'), htmlspecialchars($subscriber)); return Mailer::formatMailerSendErrorResult($response); } return Mailer::formatMailerSendSuccessResult(); diff --git a/lib/Mailer/Methods/MailPoet.php b/lib/Mailer/Methods/MailPoet.php index 847c29aec1..e08fc48cdd 100644 --- a/lib/Mailer/Methods/MailPoet.php +++ b/lib/Mailer/Methods/MailPoet.php @@ -37,7 +37,7 @@ class MailPoet { if(!empty($result['code']) && $result['code'] === API::RESPONSE_CODE_KEY_INVALID) { Bridge::invalidateKey(); } - $result['message'] .= sprintf(' %s: %s', __('Unprocessed subscriber', 'mailpoet'), $subscriber); + $result['message'] .= sprintf(' %s: %s', __('Unprocessed subscriber', 'mailpoet'), htmlspecialchars($subscriber)); return Mailer::formatMailerSendErrorResult($result['message']); case API::SENDING_STATUS_OK: default: diff --git a/lib/Mailer/Methods/PHPMail.php b/lib/Mailer/Methods/PHPMail.php index 50ee946333..b3cf01df2a 100644 --- a/lib/Mailer/Methods/PHPMail.php +++ b/lib/Mailer/Methods/PHPMail.php @@ -31,7 +31,7 @@ class PHPMail { Mailer::formatMailerSendSuccessResult(); } else { $result = sprintf(__('%s has returned an unknown error.', 'mailpoet'), Mailer::METHOD_PHPMAIL); - $result .= sprintf(' %s: %s', __('Unprocessed subscriber', 'mailpoet'), $subscriber); + $result .= sprintf(' %s: %s', __('Unprocessed subscriber', 'mailpoet'), htmlspecialchars($subscriber)); return Mailer::formatMailerSendErrorResult($result); } } diff --git a/lib/Mailer/Methods/SMTP.php b/lib/Mailer/Methods/SMTP.php index 795175e696..86f20c2c61 100644 --- a/lib/Mailer/Methods/SMTP.php +++ b/lib/Mailer/Methods/SMTP.php @@ -116,7 +116,7 @@ class SMTP { } else { $message = sprintf(__('%s has returned an unknown error.', 'mailpoet'), Mailer::METHOD_SMTP); } - $message .= sprintf(' %s: %s', __('Unprocessed subscriber', 'mailpoet'), $subscriber); + $message .= sprintf(' %s: %s', __('Unprocessed subscriber', 'mailpoet'), htmlspecialchars($subscriber)); return $message; } diff --git a/lib/Mailer/Methods/SendGrid.php b/lib/Mailer/Methods/SendGrid.php index d6e3520c11..e0b5b56cd9 100644 --- a/lib/Mailer/Methods/SendGrid.php +++ b/lib/Mailer/Methods/SendGrid.php @@ -30,7 +30,7 @@ class SendGrid { $response = (!empty($response['errors'][0])) ? $response['errors'][0] : sprintf(__('%s has returned an unknown error.', 'mailpoet'), Mailer::METHOD_SENDGRID); - $response .= sprintf(' %s: %s', __('Unprocessed subscriber', 'mailpoet'), $subscriber); + $response .= sprintf(' %s: %s', __('Unprocessed subscriber', 'mailpoet'), htmlspecialchars($subscriber)); return Mailer::formatMailerSendErrorResult($response); } return Mailer::formatMailerSendSuccessResult();