diff options
Diffstat (limited to 'camel/camel-mime-part-utils.c')
-rw-r--r-- | camel/camel-mime-part-utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c index d71108afa5..2c9c03e104 100644 --- a/camel/camel-mime-part-utils.c +++ b/camel/camel-mime-part-utils.c @@ -343,8 +343,9 @@ simple_data_wrapper_construct_from_parser (CamelDataWrapper *dw, CamelMimeParser while (inptr < inend && isspace ((int) *inptr)) inptr++; - - if (inptr < inend && *inptr == '<') { + + if (((inend-inptr) > 5 && g_ascii_strncasecmp(inptr, "<html", 5) == 0) + || ((inend-inptr) > 9 && g_ascii_strncasecmp(inptr, "<!doctype", 9) == 0)) { /* re-tag as text/html */ g_free (ct->subtype); ct->subtype = g_strdup ("html"); |