File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -84,10 +84,12 @@ def email(
8484 )
8585 )
8686 if re .match (
87+ # extended latin
88+ r"(^[\u0100-\u017F\u0180-\u024F]"
8789 # dot-atom
88- r"(^ [-!#$%&'*+/=?^_`{}|~0-9a-z]+(\.[-!#$%&'*+/=?^_`{}|~0-9a-z]+)*$"
90+ + r"| [-!#$%&'*+/=?^_`{}|~0-9a-z]+(\.[-!#$%&'*+/=?^_`{}|~0-9a-z]+)*$"
8991 # quoted-string
90- + r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\ 011\013\014\016-\177 ])*"$)' ,
92+ + r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\011. ])*"$)' ,
9193 username_part ,
9294 re .IGNORECASE ,
9395 )
Original file line number Diff line number Diff line change 1313@lru_cache
1414def _username_regex ():
1515 return re .compile (
16+ # extended latin
17+ r"(^[\u0100-\u017F\u0180-\u024F]"
1618 # dot-atom
17- r"(^ [-!#$%&'*+/=?^_`{}|~0-9a-z]+(\.[-!#$%&'*+/=?^_`{}|~0-9a-z]+)*$"
19+ + r"| [-!#$%&'*+/=?^_`{}|~0-9a-z]+(\.[-!#$%&'*+/=?^_`{}|~0-9a-z]+)*$"
1820 # non-quoted-string
19- + r"|^([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\ 011\013\014\016-\177 ])*$)" ,
21+ + r"|^([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\011. ])*$)" ,
2022 re .IGNORECASE ,
2123 )
2224
Original file line number Diff line number Diff line change 1717 ("example@valid-with-hyphens.com" ,),
1818 ("test@domain.with.idn.tld.उदाहरण.परीक्षा" ,),
1919 ("email@localhost.in" ,),
20+ ("Łókaść@email.com" ,),
21+ ("łemłail@here.com" ,),
2022 ("email@localdomain.org" ,),
2123 ('"\\ \011 "@here.com' ,),
2224 ],
You can’t perform that action at this time.
0 commit comments