diff options
author | alecpl <alec@alec.pl> | 2012-03-03 13:20:14 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2012-03-03 13:20:14 +0000 |
commit | 4ffa559227a2abecc12f8402b6ef99a06dfa4806 (patch) | |
tree | bbd74b108c557faadfc7ff7e43395ab8454949d9 /program/steps/mail | |
parent | 0411ae5a29632e9f157071afa7acdda48e8de20b (diff) |
- Apply fixes from trunk
Diffstat (limited to 'program/steps/mail')
-rw-r--r-- | program/steps/mail/sendmail.inc | 6 |
1 files changed, 5 insertions, 1 deletions
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; |