aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-03-27 14:05:46 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-03-27 14:05:46 +0800
commitb3293f0d99b13c1ee49f3605534ee3552cf19158 (patch)
treeaae4093f99f505e75684e56b384755e9e3741c1f
parentcd51875a54f1e77fb433a9b90277047dc580608f (diff)
downloadgsoc2013-evolution-b3293f0d99b13c1ee49f3605534ee3552cf19158.tar
gsoc2013-evolution-b3293f0d99b13c1ee49f3605534ee3552cf19158.tar.gz
gsoc2013-evolution-b3293f0d99b13c1ee49f3605534ee3552cf19158.tar.bz2
gsoc2013-evolution-b3293f0d99b13c1ee49f3605534ee3552cf19158.tar.lz
gsoc2013-evolution-b3293f0d99b13c1ee49f3605534ee3552cf19158.tar.xz
gsoc2013-evolution-b3293f0d99b13c1ee49f3605534ee3552cf19158.tar.zst
gsoc2013-evolution-b3293f0d99b13c1ee49f3605534ee3552cf19158.zip
Do a more thorough check for html marked as text/plain. Check that the
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. svn path=/trunk/; revision=20544
-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");