From f62d8987721265f91d38552705e3facbb20be0c6 Mon Sep 17 00:00:00 2001 From: Mehdi ABAAKOUK Date: Tue, 7 Mar 2017 13:02:43 +0100 Subject: [PATCH] attachment/pager: Use mailcap for test/* except plain (#449) * attachment: Use mailcap for test/* except plain This change makes attachment view using mailcap for everything not text/plain. * pager: Don't assume all text/* are plaintext This change removes the assumption that all text/* are humain readable plaintext. Closes #430 --- handler.c | 2 +- muttlib.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/handler.c b/handler.c index fdf8c7b06..2900ed841 100644 --- a/handler.c +++ b/handler.c @@ -1823,7 +1823,7 @@ int mutt_body_handler (BODY *b, STATE *s) else if (ascii_strcasecmp ("enriched", b->subtype) == 0) handler = text_enriched_handler; else /* text body type without a handler */ - plaintext = 1; + plaintext = 0; } else if (b->type == TYPEMESSAGE) { diff --git a/muttlib.c b/muttlib.c index 5dd8fdc8e..3e9d0f264 100644 --- a/muttlib.c +++ b/muttlib.c @@ -734,10 +734,9 @@ int mutt_needs_mailcap (BODY *m) switch (m->type) { case TYPETEXT: - /* we can display any text, overridable by auto_view */ - return 0; + if (!ascii_strcasecmp ("plain", m->subtype)) + return 0; break; - case TYPEAPPLICATION: if((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp(m)) return 0; -- 2.50.1