Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Unified Diff: Source/core/html/forms/EmailInputType.cpp

Issue 132483006: EmailInputType should set typeMismatch=true for emails with domain labels beginning or ending with … (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/forms/resources/ValidityState-typeMismatch-email.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/EmailInputType.cpp
diff --git a/Source/core/html/forms/EmailInputType.cpp b/Source/core/html/forms/EmailInputType.cpp
index 20db60bf5f2b96adae3fb789b2b0c53a8d8f8fd0..968df8c3e29a6fcea62ab2a8bc38c6cd4817fc0f 100644
--- a/Source/core/html/forms/EmailInputType.cpp
+++ b/Source/core/html/forms/EmailInputType.cpp
@@ -45,7 +45,8 @@ static const char localPartCharacters[] = "abcdefghijklmnopqrstuvwxyz0123456789!
static const char emailPattern[] =
"[a-z0-9!#$%&'*+/=?^_`{|}~.-]+" // local part
"@"
- "[a-z0-9-]+(\\.[a-z0-9-]+)*"; // domain part
+ "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?" // domain part
+ "(?:\\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*";
// RFC5321 says the maximum total length of a domain name is 255 octets.
static const size_t maximumDomainNameLength = 255;
« no previous file with comments | « LayoutTests/fast/forms/resources/ValidityState-typeMismatch-email.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698