aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-04-12 07:30:33 +0800
committerDan Winship <danw@src.gnome.org>2001-04-12 07:30:33 +0800
commit9763978157519cb0f3878fde23bcf7987698ed1e (patch)
tree28b3455dd145ce052c41c309be72f3ae64472be4
parentac31cddc109d23041bcf536bfba2b25a9e95e8b6 (diff)
downloadgsoc2013-evolution-9763978157519cb0f3878fde23bcf7987698ed1e.tar
gsoc2013-evolution-9763978157519cb0f3878fde23bcf7987698ed1e.tar.gz
gsoc2013-evolution-9763978157519cb0f3878fde23bcf7987698ed1e.tar.bz2
gsoc2013-evolution-9763978157519cb0f3878fde23bcf7987698ed1e.tar.lz
gsoc2013-evolution-9763978157519cb0f3878fde23bcf7987698ed1e.tar.xz
gsoc2013-evolution-9763978157519cb0f3878fde23bcf7987698ed1e.tar.zst
gsoc2013-evolution-9763978157519cb0f3878fde23bcf7987698ed1e.zip
Only look for special pseudo-multipart-isms (binhex, uucode, old pgp, etc)
* mail-format.c (handle_text_plain): Only look for special pseudo-multipart-isms (binhex, uucode, old pgp, etc) if the MIME type is really text/plain. Otherwise, since there's no handler for applciation/mac-binhex40, it gets sent to mail-identify.c, which thinks it's text/plain because it starts with English words, and so it gets sent back to the text/plain handler, which finds an embedded binhex part... svn path=/trunk/; revision=9260
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/mail-format.c10
2 files changed, 17 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index b594aa5974..1b9d91bd21 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,13 @@
2001-04-11 Dan Winship <danw@ximian.com>
+ * mail-format.c (handle_text_plain): Only look for special
+ pseudo-multipart-isms (binhex, uucode, old pgp, etc) if the MIME
+ type is really text/plain. Otherwise, since there's no handler for
+ applciation/mac-binhex40, it gets sent to mail-identify.c, which
+ thinks it's text/plain because it starts with English words, and
+ so it gets sent back to the text/plain handler, which finds an
+ embedded binhex part...
+
* mail-callbacks.c (do_view_message): mark messages as seen when
opening then in a separate window.
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 53ba0dd57d..3ff74238f0 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -860,6 +860,7 @@ handle_text_plain (CamelMimePart *part, const char *mime_type,
camel_medium_get_content_object (CAMEL_MEDIUM (part));
char *text, *p, *start;
CamelContentType *type;
+ gboolean check_specials;
const char *format;
int i;
@@ -875,8 +876,15 @@ handle_text_plain (CamelMimePart *part, const char *mime_type,
mail_html_write (md->html, md->stream, "\n<!-- text/plain -->\n<font size=\"-3\">&nbsp</font><br>\n");
+ /* Only look for binhex and stuff if this is real text/plain.
+ * (and not, say, application/mac-binhex40 that mail-identify
+ * has decided to call text/plain because it starts with English
+ * text...)
+ */
+ check_specials = g_strcasecmp (mime_type, "text/plain") != 0;
+
p = text;
- while (p) {
+ while (p && check_specials) {
/* Look for special cases. */
for (i = 0; i < NSPECIALS; i++) {
start = strstr (p, text_specials[i].start);