Skip to content

Commit

Permalink
db/utils: strip cte before comparing
Browse files Browse the repository at this point in the history
Fixes #1325
  • Loading branch information
dcbaker authored and pazz committed Oct 19, 2018
1 parent 8c4dd4d commit f1972c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alot/db/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f1972c5

Please sign in to comment.