diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-03-21 12:36:21 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-03-21 12:36:21 +0000 |
| commit | 9bab9eba9e5b22fdd00f7eef68344ec9e63135fd (patch) | |
| tree | 916acd169d4912e789d301598226e458710e529a | |
| parent | 86a50f2b5f229328cbff6ccee9aa93ef6693eacb (diff) | |
Correctly quote email recipient string
git-svn-id: https://svn.roundcube.net/trunk@1197 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/program/include/rcube_imap.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/roundcubemail/program/include/rcube_imap.inc b/roundcubemail/program/include/rcube_imap.inc index 94f5017b8..170e4a565 100644 --- a/roundcubemail/program/include/rcube_imap.inc +++ b/roundcubemail/program/include/rcube_imap.inc @@ -2285,7 +2285,7 @@ class rcube_imap $address = $val['address']; $name = preg_replace(array('/^[\'"]/', '/[\'"]$/'), '', trim($val['name'])); if ($name && $address && $name != $address) - $string = sprintf('%s <%s>', strpos($name, ',')!==FALSE ? '"'.$name.'"' : $name, $address); + $string = sprintf('%s <%s>', preg_match('/[,;<>]/', $name) ? '"'.addcslashes($name, '"').'"' : $name, $address); else if ($address) $string = $address; else if ($name) |
