[MERGE] forward port of branch saas-3 up to ffc40b6

This commit is contained in:
Denis Ledoux 2015-05-12 18:03:04 +02:00
commit ddb8d40e3b
2 changed files with 4 additions and 2 deletions

View File

@ -39,6 +39,8 @@ def decode(text):
"""Returns unicode() string conversion of the the given encoded smtp header text"""
if text:
text = decode_header(text.replace('\r', ''))
# The joining space will not be needed as of Python 3.3
# See https://hg.python.org/cpython/rev/8c03fe231877
return ' '.join([tools.ustr(x[0], x[1]) for x in text])
class MLStripper(HTMLParser):