From 68438db6fec3a569f0504a592b0b7f042aa0b458 Mon Sep 17 00:00:00 2001 From: Johannes Larsen Date: Tue, 3 Sep 2024 17:55:29 +0200 Subject: [PATCH] Keep ESC control characters in the message body In order to bring back support for ANSI colored HTML renderings etc. Fixes #1679 --- alot/helper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alot/helper.py b/alot/helper.py index d5ac9efe7..e40e592f6 100644 --- a/alot/helper.py +++ b/alot/helper.py @@ -47,7 +47,8 @@ def unicode_printable(c): private/unassigned character and not a control character other than tab or newline. """ - if c in ('\n', '\t'): + ESC = '\x1b' + if c in ('\n', '\t', ESC): return True return unicodedata.category(c) not in ('Cc', 'Cn', 'Co')