From 71360e18f3d7725f96a6b949bfb1d7e494b9842b Mon Sep 17 00:00:00 2001 From: Brendan Cully Date: Mon, 1 Mar 2010 22:35:30 -0800 Subject: [PATCH] Another attempt to dequote RFC2047-encoded address comments (see #2014) --- ChangeLog | 13 +++++++++++++ copy.c | 3 +++ rfc822.c | 2 +- rfc822.h | 1 + 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3bef557d..0993355a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2010-03-01 16:14 -0800 Brendan Cully (86d93280e5b3) + + * rfc822.c: Backed out changeset 2a4ca6917fd0. It is incompatible with + $assumed_charset (see #2014). + +2010-02-28 23:03 -0800 Brendan Cully (2a4ca6917fd0) + + * rfc822.c: RFC-2047 decode address text before dequoting it (see + #2014) + + * doc/manual.xml.head: Fix next-unread-mailbox name in + documentation. Closes #3319. + 2010-02-28 17:23 -0800 Antonio Radici (25459cbb132a) * po/de.po: Fix German translation of "No undeleted messages." (closes diff --git a/copy.c b/copy.c index 9ddf411b..e3716b72 100644 --- a/copy.c +++ b/copy.c @@ -868,6 +868,7 @@ static int address_header_decode (char **h) int l, rp = 0; ADDRESS *a = NULL; + ADDRESS *cur = NULL; switch (tolower ((unsigned char) *s)) { @@ -937,6 +938,8 @@ static int address_header_decode (char **h) mutt_addrlist_to_local (a); rfc2047_decode_adrlist (a); + for (cur = a; cur; cur = cur->next) + rfc822_dequote_comment (a->personal); /* angle brackets for return path are mandated by RfC5322, * so leave Return-Path as-is */ diff --git a/rfc822.c b/rfc822.c index 5569d319..14abeb74 100644 --- a/rfc822.c +++ b/rfc822.c @@ -60,7 +60,7 @@ const char *RFC822Errors[] = { "bad address spec" }; -static void rfc822_dequote_comment (char *s) +void rfc822_dequote_comment (char *s) { char *w = s; diff --git a/rfc822.h b/rfc822.h index 4684e971..0c48f75a 100644 --- a/rfc822.h +++ b/rfc822.h @@ -46,6 +46,7 @@ typedef struct address_t } ADDRESS; +void rfc822_dequote_comment (char *s); void rfc822_free_address (ADDRESS **); void rfc822_qualify (ADDRESS *, const char *); ADDRESS *rfc822_parse_adrlist (ADDRESS *, const char *s); -- 2.40.0