Skip to content

Commit

Permalink
Keep ESC control characters in the message body
Browse files Browse the repository at this point in the history
In order to bring back support for ANSI colored HTML renderings etc.

Fixes #1679
  • Loading branch information
johslarsen committed Sep 5, 2024
1 parent 2c32c68 commit 68438db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion alot/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit 68438db

Please sign in to comment.