From 4ffa559227a2abecc12f8402b6ef99a06dfa4806 Mon Sep 17 00:00:00 2001 From: alecpl Date: Sat, 3 Mar 2012 13:20:14 +0000 Subject: - Apply fixes from trunk --- program/steps/mail/sendmail.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'program/steps/mail') diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index 1b9d387f6..25eb0596e 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -176,7 +176,11 @@ function rcmail_email_input_format($mailto, $count=false, $check=true) // address with name (handle name) } else if (preg_match('/<*'.$email_regexp.'>*$/', $item, $matches)) { $address = $matches[0]; - $name = trim(str_replace($address, '', $item), '" '); + $name = trim(str_replace($address, '', $item)); + if ($name[0] == '"' && $name[count($name)-1] == '"') { + $name = substr($name, 1, -1); + } + $name = stripcslashes($name); $address = rcube_idn_to_ascii(trim($address, '<>')); $result[] = format_email_recipient($address, $name); $item = $address; -- cgit v1.2.3