From f57505160af4304b5f99a83beb2316a12dcc90aa Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Sun, 3 Nov 2019 15:06:23 +0000 Subject: sanitize message text for display This ensures that non-printable characters (tabs) are replaced in the message body texts in envelope buffers and in source texts in thread mode. fix #1439 --- alot/buffers/envelope.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'alot/buffers/envelope.py') diff --git a/alot/buffers/envelope.py b/alot/buffers/envelope.py index 45b2809f..ae2972d7 100644 --- a/alot/buffers/envelope.py +++ b/alot/buffers/envelope.py @@ -9,6 +9,7 @@ from ..settings.const import settings from ..widgets.globals import HeadersList from ..widgets.globals import AttachmentWidget from ..helper import shorten_author_string +from ..helper import string_sanitize class EnvelopeBuffer(Buffer): @@ -88,7 +89,7 @@ class EnvelopeBuffer(Buffer): self.attachment_wgt = urwid.Pile(lines) displayed_widgets.append(self.attachment_wgt) - self.body_wgt = urwid.Text(self.envelope.body) + self.body_wgt = urwid.Text(string_sanitize(self.envelope.body)) displayed_widgets.append(self.body_wgt) self.body = urwid.ListBox(displayed_widgets) -- cgit v1.2.3