From 28667a045b9d122148ae541270b17f76d9ca6e44 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 25 Jun 2003 10:12:06 +0000 Subject: ** See bug #43887 2003-06-20 Not Zed ** See bug #43887 * mail-format.c (mail_get_message_body): handle text/enriched and text/richtext explictly, and dont treat them as text/plain. svn path=/trunk/; revision=21528 --- mail/ChangeLog | 7 +++++++ mail/mail-format.c | 15 ++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 1ae2ec643c..02e3db15f1 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2003-06-20 Not Zed + + ** See bug #43887 + + * mail-format.c (mail_get_message_body): handle text/enriched and + text/richtext explictly, and dont treat them as text/plain. + 2003-06-23 Radek Doulik * mail-config.c (config_write_style): add diff --git a/mail/mail-format.c b/mail/mail-format.c index 501bf09972..a3004365ca 100644 --- a/mail/mail-format.c +++ b/mail/mail-format.c @@ -2007,13 +2007,18 @@ mail_get_message_body (CamelDataWrapper *data, gboolean want_plain, gboolean cit g_byte_array_free (bytes, FALSE); } - if (text && !header_content_type_is (mime_type, "text", "html")) { + if (text && !header_content_type_is(mime_type, "text", "html")) { char *html; - html = camel_text_to_html (text, CAMEL_MIME_FILTER_TOHTML_PRE | - CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS | - (cite ? CAMEL_MIME_FILTER_TOHTML_CITE : 0), 0); - g_free (text); + if (header_content_type_is(mime_type, "text", "richtext")) + html = camel_enriched_to_html(text, CAMEL_MIME_FILTER_ENRICHED_IS_RICHTEXT); + else if (header_content_type_is(mime_type, "text", "enriched")) + html = camel_enriched_to_html(text, 0); + else + html = camel_text_to_html (text, CAMEL_MIME_FILTER_TOHTML_PRE | + CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS | + (cite ? CAMEL_MIME_FILTER_TOHTML_CITE : 0), 0); + g_free(text); text = html; } return text; -- cgit v1.2.3