summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-03-21 12:36:21 +0000
committerthomascube <thomas@roundcube.net>2008-03-21 12:36:21 +0000
commit52f8caf7706cbdd6087ac9c555270604554db5ef (patch)
tree6d8d40a9144c79a8b1dc7ba7dcdfeee7089a6317 /program/include
parent9e60d4b9916fcbb1a765b85fbf57b28e5cfddb84 (diff)
Correctly quote email recipient string
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_imap.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc
index 94f5017b8..170e4a565 100644
--- a/program/include/rcube_imap.inc
+++ b/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)