aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-12-16 01:37:47 +0800
committerMilan Crha <mcrha@redhat.com>2010-12-16 01:37:47 +0800
commitd132f8fd1c265b473954ab60d8b16db1f5aa04a8 (patch)
tree63ccdd857ba6c1499c5e72e4201be7dac9b86efe /mail
parent01bff4baf00559f9cc6b3b78f7fd03a22d6ed327 (diff)
downloadgsoc2013-evolution-d132f8fd1c265b473954ab60d8b16db1f5aa04a8.tar
gsoc2013-evolution-d132f8fd1c265b473954ab60d8b16db1f5aa04a8.tar.gz
gsoc2013-evolution-d132f8fd1c265b473954ab60d8b16db1f5aa04a8.tar.bz2
gsoc2013-evolution-d132f8fd1c265b473954ab60d8b16db1f5aa04a8.tar.lz
gsoc2013-evolution-d132f8fd1c265b473954ab60d8b16db1f5aa04a8.tar.xz
gsoc2013-evolution-d132f8fd1c265b473954ab60d8b16db1f5aa04a8.tar.zst
gsoc2013-evolution-d132f8fd1c265b473954ab60d8b16db1f5aa04a8.zip
Bug #250046 - Quote names in addresses when necessary in mail preview
Diffstat (limited to 'mail')
-rw-r--r--mail/em-format-html.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 6b74da70b5..f32124d321 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -2415,7 +2415,13 @@ efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_addres
if (name && *name) {
gchar *real, *mailaddr;
- g_string_append_printf (out, "%s &lt;", name);
+ if (strchr (a->name, ',') || strchr (a->name, ';'))
+ g_string_append_printf (out, "&quot;%s&quot;", name);
+ else
+ g_string_append (out, name);
+
+ g_string_append (out, " &lt;");
+
/* rfc2368 for mailto syntax and url encoding extras */
if ((real = camel_header_encode_phrase ((guchar *)a->name))) {
mailaddr = g_strdup_printf("%s <%s>", real, a->v.addr);