summaryrefslogtreecommitdiff
path: root/alot/buffers
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2019-11-03 15:06:23 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2019-11-21 09:11:38 +0000
commitf57505160af4304b5f99a83beb2316a12dcc90aa (patch)
tree6ec01b3fa547393958cd6387acd54c76abb7a421 /alot/buffers
parentb01caf2039e22ad3b6aef7c3ffcff7d38e3faf6b (diff)
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
Diffstat (limited to 'alot/buffers')
-rw-r--r--alot/buffers/envelope.py3
1 files changed, 2 insertions, 1 deletions
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)