]> granicus.if.org Git - mutt/commitdiff
RFC-2047 decode address text before dequoting it (see #2014)
authorBrendan Cully <brendan@kublai.com>
Mon, 1 Mar 2010 07:03:35 +0000 (23:03 -0800)
committerBrendan Cully <brendan@kublai.com>
Mon, 1 Mar 2010 07:03:35 +0000 (23:03 -0800)
rfc822.c

index 5569d319fc92bfa2023b974f327df78127747fb9..b1809cc2d9964d09d14623fb63c48624fd031f95 100644 (file)
--- a/rfc822.c
+++ b/rfc822.c
@@ -38,6 +38,7 @@
 #endif
 
 #include "mutt_idna.h"
+#include "rfc2047.h"
 
 #define terminate_string(a, b, c) do { if ((b) < (c)) a[(b)] = 0; else \
        a[(c)] = 0; } while (0)
@@ -491,9 +492,11 @@ ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s)
       cur = rfc822_new_address ();
       if (phraselen)
       {
-       /* if we get something like "Michael R. Elkins" remove the quotes */
-       rfc822_dequote_comment (phrase);
        cur->personal = safe_strdup (phrase);
+       /* if we get something like "Michael R. Elkins" remove the quotes */
+       /* quotes may be encoded in RFC2047 */
+       rfc2047_decode (&cur->personal);
+       rfc822_dequote_comment (cur->personal);
       }
       if ((ps = parse_route_addr (s + 1, comment, &commentlen, sizeof (comment) - 1, cur)) == NULL)
       {