mu: decode mailing-list headers

MIME-decode mailing list headers, too. Also add a unit test. This fixes
issue #728.
This commit is contained in:
djcb
2015-12-15 07:21:26 +02:00
parent 2d443a953c
commit 3cf96899ef
3 changed files with 20 additions and 7 deletions

View File

@ -376,8 +376,20 @@ mu_msg_get_msgid (MuMsg *self)
const char*
mu_msg_get_mailing_list (MuMsg *self)
{
const char *ml;
char *decml;
g_return_val_if_fail (self, NULL);
return get_str_field (self, MU_MSG_FIELD_ID_MAILING_LIST);
ml = get_str_field (self, MU_MSG_FIELD_ID_MAILING_LIST);
if (!ml)
return NULL;
decml = g_mime_utils_header_decode_text (ml);
if (!decml)
return NULL;
return free_later_str (self, decml);
}