aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-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);