Commit 33725faa authored by jcnventura's avatar jcnventura

Fix #435386 by rhys: accept recipient lists with consecutive separators (newlines or commas)

parent a01ab7bd
......@@ -179,7 +179,7 @@ function print_mail_form_validate($form, &$form_state) {
}
// All new-lines are replaced by commas
$to_addrs = str_replace(array("\r\n", "\n", "\r"), ',', $form_state['values']['txt_to_addrs']);
$to_addrs = preg_replace('![\r|\n|,]+!', ',', $form_state['values']['txt_to_addrs']);
// Create an array from the string
$to_array = explode(',', $to_addrs);
// Verify each element of the array
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment