diff options
author | Kevin McCarthy <kevin@8t8.us> | 2016-03-30 13:16:20 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2016-03-30 13:16:20 -0700 |
commit | c9f060b776830f16856d53d1141ae37da5befc60 (patch) | |
tree | 39c004b0e369de4dcac803f241b2e4e521fcdad5 | |
parent | e8c22ade073b2d5b886756f39d0ea415dfbd615d (diff) |
Filter out bidi marks in rfc2047 and rfc2231 encoding. (see #3827)
Filter out U+200F RIGHT-TO-LEFT MARK and U+200E LEFT-TO-RIGHT MARK in
rfc2047 and 2231 encoded fields. GNU Screen has a bug that corrupts
the display, and can cause the wrong email to appear to be selected in
the index. Until screen fixes the issue, filter it out in mutt.
-rw-r--r-- | mbyte.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -548,6 +548,14 @@ int mutt_filter_unprintable (char **s) } if (!IsWPrint (wc)) wc = '?'; + /* HACK: + * Work around a gnu screen bug. See ticket #3827. + * Filter out the RIGHT-TO-LEFT and LEFT-TO-RIGHT bidi marks because + * they result in screen corruption. + */ + else if (Charset_is_utf8 && + ((wc == (wchar_t)0x200f) || (wc == (wchar_t)0x200e))) + wc = '?'; k2 = wcrtomb (scratch, wc, &mbstate2); scratch[k2] = '\0'; mutt_buffer_addstr (b, scratch); |