From 61f3f5669ac6418c33dd4bbfaef61ee29bd9fecd Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 29 Jan 2013 13:50:00 +0000 Subject: Bug #692775 - Double-quoting message with HTML and text --- diff --git a/modules/prefer-plain/e-mail-parser-prefer-plain.c b/modules/prefer-plain/e-mail-parser-prefer-plain.c index 66ff321..02cfd99 100644 --- a/modules/prefer-plain/e-mail-parser-prefer-plain.c +++ b/modules/prefer-plain/e-mail-parser-prefer-plain.c @@ -322,6 +322,20 @@ empe_prefer_plain_parse (EMailParserExtension *extension, } if (plain_text_parts) { + if (parts && nparts > 1) { + /* a text/html part is hidden, but not marked as attachment, + thus do that now, when there exists a text/plain part */ + GSList *piter; + + for (piter = parts; piter; piter = g_slist_next (piter)) { + EMailPart *mpart = piter->data; + + if (mpart && mpart->is_hidden && g_strcmp0 (mpart->mime_type, "text/html") == 0) { + mpart->is_attachment = TRUE; + } + } + } + /* plain_text parts should be always first */ parts = g_slist_concat (plain_text_parts, parts); } -- cgit v0.9.0.2