contact email can contain whitespace

This commit is contained in:
Son NK 2020-09-14 18:21:30 +02:00
parent 299f7d3fba
commit 40892f8253
1 changed files with 1 additions and 0 deletions

View File

@ -576,6 +576,7 @@ def parseaddr_unicode(addr) -> (str, str):
'=?UTF-8?B?TmjGoW4gTmd1eeG7hW4=?= <abcd@gmail.com>' -> ('Nhơn Nguyễn', "abcd@gmail.com")
"""
name, email = parseaddr(addr)
# email can have whitespace so we can't remove whitespace here
email = email.strip().lower()
if name:
name = name.strip()