You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

611410-no-implicit_autoview-for-text-html.patch 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. From: Antonio Radici <antonio@debian.org>
  2. Date: Thu, 27 Feb 2014 17:36:31 +0100
  3. Subject: 611410-no-implicit_autoview-for-text-html
  4. MIME-Version: 1.0
  5. Content-Type: text/plain; charset="utf-8"
  6. Content-Transfer-Encoding: 8bit
  7. This patch blacklist text/html from the list of documents that will be
  8. shown automatically, the patch (the muttlib.c part) has been written by
  9. Loïc Minier <lool@dooz.org>, I've added the documentation bit.
  10. The patch has been forwarded upstream originally by Loïc on:
  11. http://bugs.mutt.org/3496
  12. The original Debian bug for this problem is:
  13. http://bugs.debian.org/611410
  14. Gbp-Pq: Topic upstream
  15. ---
  16. init.h | 4 +++-
  17. muttlib.c | 3 +++
  18. 2 files changed, 6 insertions(+), 1 deletion(-)
  19. diff --git a/init.h b/init.h
  20. index 42b79d6..08e004c 100644
  21. --- a/init.h
  22. +++ b/init.h
  23. @@ -1222,7 +1222,9 @@ struct option_t MuttVars[] = {
  24. ** ``\fCcopiousoutput\fP'' flag set for \fIevery\fP MIME attachment it doesn't have
  25. ** an internal viewer defined for. If such an entry is found, mutt will
  26. ** use the viewer defined in that entry to convert the body part to text
  27. - ** form.
  28. + ** form. MIME attachments with 'text' types, with the only exception
  29. + ** of text/html, are excluded: they will be shown as they are unless auto_view
  30. + ** is specified.
  31. */
  32. { "include", DT_QUAD, R_NONE, OPT_INCLUDE, M_ASKYES },
  33. /*
  34. diff --git a/muttlib.c b/muttlib.c
  35. index 0425d45..c0d2026 100644
  36. --- a/muttlib.c
  37. +++ b/muttlib.c
  38. @@ -658,6 +658,9 @@ int mutt_needs_mailcap (BODY *m)
  39. switch (m->type)
  40. {
  41. case TYPETEXT:
  42. + /* we don't want to display text/html */
  43. + if (!ascii_strcasecmp ("html", m->subtype))
  44. + return 1;
  45. /* we can display any text, overridable by auto_view */
  46. return 0;
  47. break;