From 40892f8253d5f23755fcb5f166661041953cc28d Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Mon, 14 Sep 2020 18:21:30 +0200 Subject: [PATCH] contact email can contain whitespace --- app/email_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/email_utils.py b/app/email_utils.py index 5c448b65..c592cee9 100644 --- a/app/email_utils.py +++ b/app/email_utils.py @@ -576,6 +576,7 @@ def parseaddr_unicode(addr) -> (str, str): '=?UTF-8?B?TmjGoW4gTmd1eeG7hW4=?= ' -> ('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()