aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-format.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-format.c')
-rw-r--r--mail/mail-format.c10
1 files changed, 9 insertions, 1 deletions
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);