summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-10-18 15:37:29 -0700
committerPatrick Totzke <patricktotzke@gmail.com>2018-10-19 08:41:43 +0200
commitf1972c5f824c41d0851e116a1f9fe9c1fa58bc10 (patch)
treeb60a06c3cc0e3b1856afd5cd00e12d82b8cc8470 /alot
parent8c4dd4ddf012701e621dbb1ab284535b2b925566 (diff)
db/utils: strip cte before comparing
Fixes #1325
Diffstat (limited to 'alot')
-rw-r--r--alot/db/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/db/utils.py b/alot/db/utils.py
index abbdd4ea..0a7a3e7a 100644
--- a/alot/db/utils.py
+++ b/alot/db/utils.py
@@ -386,7 +386,7 @@ def remove_cte(part, as_string=False):
:rtype: Union[str, bytes]
"""
enc = part.get_content_charset() or 'ascii'
- cte = str(part.get('content-transfer-encoding', '7bit')).lower()
+ cte = str(part.get('content-transfer-encoding', '7bit')).lower().strip()
payload = part.get_payload()
if cte == '8bit':
# Python's mail library may decode 8bit as raw-unicode-escape, so