diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | 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 <NotZed@Ximian.com> + + ** 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 <rodo@ximian.com> * 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; |