aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog8
-rw-r--r--camel/camel-mime-part-utils.c5
2 files changed, 11 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index bf73221406..8a01527f99 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,11 @@
+2003-03-28 Not Zed <NotZed@Ximian.com>
+
+ *
+ camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
+ Do a more thorough check for html marked as text/plain. Check
+ that the text starts with <html or <!doctype. More complete fix
+ for #16817.
+
2003-03-26 Jeffrey Stedfast <fejj@ximian.com>
* camel-sasl-gssapi.c (camel_sasl_gssapi_finalize): Pass in the
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");