]> granicus.if.org Git - mutt/commitdiff
Ignore zero width characters U+200B/U+FEFF which may garble the display. Closes ...
authorRocco Rutte <pdmef@gmx.net>
Mon, 18 Aug 2008 08:24:20 +0000 (10:24 +0200)
committerRocco Rutte <pdmef@gmx.net>
Mon, 18 Aug 2008 08:24:20 +0000 (10:24 +0200)
pager.c

diff --git a/pager.c b/pager.c
index c88b5d4c2be9e6b86d4d95b1532756db9168406f..0a7509cc01708d460a93bf2e83a45909c5ee9a2c 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -1106,6 +1106,12 @@ static int format_line (struct line_t **lineInfo, int n, unsigned char *buf,
     if (k == 0)
       k = 1;
 
+    if (Charset_is_utf8 && (wc == 0x200B || wc == 0xFEFF))
+    {
+       dprint (3, (debugfile, "skip zero-width character U+%04X\n", wc));
+       continue;
+    }
+
     /* Handle backspace */
     special = 0;
     if (IsWPrint (wc))