From aa86bf7808886bfd0be6bbb5f5b5e1931354a11a Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sun, 1 Mar 2015 17:18:05 -0800 Subject: [PATCH] CRM_Mailing_Form_Test - Email formatting --- CRM/Mailing/Form/Test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Mailing/Form/Test.php b/CRM/Mailing/Form/Test.php index 677de42610..0f953363e8 100644 --- a/CRM/Mailing/Form/Test.php +++ b/CRM/Mailing/Form/Test.php @@ -214,7 +214,7 @@ class CRM_Mailing_Form_Test extends CRM_Core_Form { foreach ($emailAdd as $key => $value) { $email = trim($value); $testParams['emails'][] = $email; - $emails .= $emails ? ",'$email'" : "'$email'"; + $emails .= ($emails ? ',' : '') . "'" . CRM_Core_DAO::escapeString($email) . "'"; if (!CRM_Utils_Rule::email($email)) { CRM_Core_Session::setStatus(ts('Please enter a valid email addresses.'), ts('Test not sent.'), 'error'); $error = TRUE; -- 2.25.1