aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format-html.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-10-16 01:27:04 +0800
committerMilan Crha <mcrha@redhat.com>2009-10-16 01:27:04 +0800
commit781d9aad4d9083f4ae380901f7b52e8fd82bf2a4 (patch)
tree4cbdd1fca53fd4851d211e3a8da13d891f8c66b8 /mail/em-format-html.c
parentf2337c65d08897c204e05071abe7cc979e4d02b8 (diff)
downloadgsoc2013-evolution-781d9aad4d9083f4ae380901f7b52e8fd82bf2a4.tar.gz
gsoc2013-evolution-781d9aad4d9083f4ae380901f7b52e8fd82bf2a4.tar.zst
gsoc2013-evolution-781d9aad4d9083f4ae380901f7b52e8fd82bf2a4.zip
Bug #468736 - Prevent recursion in em-format
Diffstat (limited to 'mail/em-format-html.c')
-rw-r--r--mail/em-format-html.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 37455a1bc4..80fa6b6567 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -1535,10 +1535,16 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo
guint32 flags;
guint32 rgb;
gint i, count, len;
+ gchar *meta;
+ gboolean is_fallback;
struct _EMFormatHTMLCache *efhc;
flags = efh->text_html_flags;
+ meta = camel_object_meta_get (part, "EMF-Fallback");
+ is_fallback = meta != NULL;
+ g_free (meta);
+
dw = camel_medium_get_content_object((CamelMedium *)part);
/* Check for RFC 2646 flowed text. */
@@ -1608,7 +1614,7 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo
continue;
type = camel_mime_part_get_content_type(newpart);
- if (camel_content_type_is (type, "text", "*") && !camel_content_type_is(type, "text", "calendar")) {
+ if (camel_content_type_is (type, "text", "*") && (is_fallback || !camel_content_type_is (type, "text", "calendar"))) {
camel_stream_printf (
stream, "<div style=\"border: solid #%06x 1px; background-color: #%06x; padding: 10px; color: #%06x;\">\n",
e_color_to_value (