summaryrefslogtreecommitdiff
path: root/alot/helper.py
diff options
context:
space:
mode:
authorSiim Põder <siim@p6drad-teel.net>2013-08-07 09:09:09 +0300
committerSiim Po~der <siim@p6drad-teel.net>2013-08-07 06:21:41 +0000
commit365e8d15989572307253da38211992f8e6965a75 (patch)
treed4c59866f1859676ff65042bfbb46f59fd5e4605 /alot/helper.py
parent4183ba5acf8b3d292dbe53a52a98e50ee3324b3a (diff)
helper: do not strip in string_sanitize
Stripping the string causes leading whitespace on the first line of a message to be removed leading to weird indentation in thread view for some html messages. string_sanitize is also used for mail header parsing but I would not expect them to contain undesired whitespace too often either.
Diffstat (limited to 'alot/helper.py')
-rw-r--r--alot/helper.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/alot/helper.py b/alot/helper.py
index c97f187c..95f1c32e 100644
--- a/alot/helper.py
+++ b/alot/helper.py
@@ -81,14 +81,13 @@ def string_sanitize(string, tab_width=8):
:type tab_width: int or `None`
>>> string_sanitize(' foo\rbar ', 8)
- 'foobar'
+ ' foobar '
>>> string_sanitize('foo\tbar', 8)
'foo bar'
>>> string_sanitize('foo\t\tbar', 8)
'foo bar'
"""
- string = string.strip()
string = string.replace('\r', '')
lines = list()