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(
84
84
)
85
85
)
86
86
if re .match (
87
+ # extended latin
88
+ r"(^[\u0100-\u017F\u0180-\u024F]"
87
89
# dot-atom
88
- r"(^ [-!#$%&'*+/=?^_`{}|~0-9a-z]+(\.[-!#$%&'*+/=?^_`{}|~0-9a-z]+)*$"
90
+ + r"| [-!#$%&'*+/=?^_`{}|~0-9a-z]+(\.[-!#$%&'*+/=?^_`{}|~0-9a-z]+)*$"
89
91
# 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. ])*"$)' ,
91
93
username_part ,
92
94
re .IGNORECASE ,
93
95
)
Original file line number Diff line number Diff line change 13
13
@lru_cache
14
14
def _username_regex ():
15
15
return re .compile (
16
+ # extended latin
17
+ r"(^[\u0100-\u017F\u0180-\u024F]"
16
18
# dot-atom
17
- r"(^ [-!#$%&'*+/=?^_`{}|~0-9a-z]+(\.[-!#$%&'*+/=?^_`{}|~0-9a-z]+)*$"
19
+ + r"| [-!#$%&'*+/=?^_`{}|~0-9a-z]+(\.[-!#$%&'*+/=?^_`{}|~0-9a-z]+)*$"
18
20
# 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. ])*$)" ,
20
22
re .IGNORECASE ,
21
23
)
22
24
Original file line number Diff line number Diff line change 17
17
("example@valid-with-hyphens.com" ,),
18
18
("test@domain.with.idn.tld.उदाहरण.परीक्षा" ,),
19
19
("email@localhost.in" ,),
20
+ ("Łókaść@email.com" ,),
21
+ ("łemłail@here.com" ,),
20
22
("email@localdomain.org" ,),
21
23
('"\\ \011 "@here.com' ,),
22
24
],
You can’t perform that action at this time.
0 commit comments