Quote all specials in name as defined on RFC
authorRicardo Mones <ricardo@mones.org>
Mon, 28 Oct 2013 09:52:52 +0000 (10:52 +0100)
committerRicardo Mones <ricardo@mones.org>
Mon, 28 Oct 2013 09:52:52 +0000 (10:52 +0100)
See http://tools.ietf.org/html/rfc5322#section-3.2.3

src/compose.c

index 2021d9f..b36c56d 100644 (file)
@@ -4733,7 +4733,7 @@ compose_current_mail_account(void)
 
 #define QUOTE_IF_REQUIRED(out, str)                                    \
 {                                                                      \
-       if (*str != '"' && strpbrk(str, ",.[]<>")) {                    \
+       if (*str != '"' && strpbrk(str, ",.:;[]<>()@\\")) {             \
                gchar *__tmp;                                           \
                gint len;                                               \
                                                                        \
@@ -4761,7 +4761,7 @@ compose_current_mail_account(void)
 
 #define QUOTE_IF_REQUIRED_NORMAL(out, str, errret)                     \
 {                                                                      \
-       if (*str != '"' && strpbrk(str, ",.[]<>")) {                    \
+       if (*str != '"' && strpbrk(str, ",.:;[]<>()@\\")) {             \
                gchar *__tmp;                                           \
                gint len;                                               \
                                                                        \