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; |