Closed bakrill closed 3 years ago
Describe the bug Encoded headers have spaces stripped depending on how they are encoded.
To Reproduce Steps to reproduce the behavior:
import mailparser
mail = mailparser.parse_from_file(f)
print(mail.subject)
aá
Expected behavior In email clients, the characters are displayed with a space between them. E.g.
Raw mail https://gist.github.com/bakrill/0f0237e506beb4d507a6a1a63b4d5e5c
Environment:
Additional context I think it originates from https://github.com/SpamScope/mail-parser/blob/develop/mailparser/utils.py#L137. Decoded header parts have surrounding whitespace stripped and are then concatenated.
Fixed. It will be in next release.
Describe the bug Encoded headers have spaces stripped depending on how they are encoded.
To Reproduce Steps to reproduce the behavior:
import mailparser
mail = mailparser.parse_from_file(f)
print(mail.subject)
aá
Expected behavior In email clients, the characters are displayed with a space between them. E.g.
Raw mail https://gist.github.com/bakrill/0f0237e506beb4d507a6a1a63b4d5e5c
Environment:
Additional context I think it originates from https://github.com/SpamScope/mail-parser/blob/develop/mailparser/utils.py#L137. Decoded header parts have surrounding whitespace stripped and are then concatenated.