From: Tim Otten Date: Mon, 2 Mar 2015 01:18:05 +0000 (-0800) Subject: CRM_Mailing_Form_Test - Email formatting X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=aa86bf7808886bfd0be6bbb5f5b5e1931354a11a;p=civicrm-core.git CRM_Mailing_Form_Test - Email formatting --- 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;