mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-29 08:48:18 -05:00
Fix canonical_email for addresses with utf-8
This commit is contained in:
committed by
Neil Williams
parent
099b6afa6f
commit
21fdf7e0ab
@@ -570,7 +570,7 @@ class Account(Thing):
|
||||
return which.get(canon, None)
|
||||
|
||||
def canonical_email(self):
|
||||
email = str(self.email.lower())
|
||||
email = self.email.lower().encode('utf-8')
|
||||
if email.count("@") != 1:
|
||||
return "invalid@invalid.invalid"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user