-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve handling of quoted local parts
Allow joining multiple atoms, e.g. [email protected] aa."bb"@example.com "aa"."bb"@example.com See #29
- Loading branch information
Showing
2 changed files
with
52 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,7 +64,12 @@ def self.model_name | |
"[email protected]", | ||
# Allow quoted characters. Valid according to http://www.rfc-editor.org/errata_search.php?rfc=3696 | ||
'"Abc\@def"@example.com', | ||
"\"quote\".dotatom.\"otherquote\"@example.com", | ||
'"Quote(Only"[email protected]', | ||
"\"much.more unusual\"@example.com", | ||
"\"[email protected]\"@example.com", | ||
'"very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com', | ||
'"()<>[]:,;@\"!#$%&*+-/=?^_`{}| ~ ? ^_`{}|~.a"@example.org', | ||
'"Fred\ Bloggs"@example.com', | ||
'"Joe.\\Blow"@example.com', | ||
# Balanced quoted characters | ||
|
@@ -98,6 +103,7 @@ def self.model_name | |
"[email protected]", | ||
"invalid-example.com", | ||
"[email protected]#r.com", | ||
"just\"not\"[email protected]", | ||
"[email protected]", | ||
"invali [email protected]", | ||
# TLD can not be only numeric | ||
|