Changeset 116757 in webkit
- Timestamp:
- May 11, 2012 6:04:02 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r116755 r116757 1 2012-05-11 Keishi Hattori <keishi@webkit.org> 2 3 Sanitization algorithm for input type=email should strip whitespaces 4 https://bugs.webkit.org/show_bug.cgi?id=86177 5 6 Reviewed by Kent Tamura. 7 8 * fast/forms/ValidityState-typeMismatch-email-expected.txt: 9 * fast/forms/input-value-sanitization-expected.txt: 10 * fast/forms/input-value-sanitization.html: 11 * fast/forms/resources/ValidityState-typeMismatch-email.js: 12 1 13 2012-05-11 Alexander Pavlov <apavlov@chromium.org> 2 14 -
trunk/LayoutTests/fast/forms/ValidityState-typeMismatch-email-expected.txt
r89915 r116757 33 33 @p.com" is a valid email address. It was sanitized to "a@p.com". 34 34 PASS "" is a valid email address. 35 PASS " " is a valid email address. It was sanitized to "". 36 PASS " a@p.com" is a valid email address. It was sanitized to "a@p.com". 37 PASS "a@p.com " is a valid email address. It was sanitized to "a@p.com". 38 PASS " a@p.com " is a valid email address. It was sanitized to "a@p.com". 39 PASS " a@p.com " is a valid email address. It was sanitized to "a@p.com". 40 PASS " a@p.com " is a valid email address. It was sanitized to "a@p.com". 41 PASS " 42 a@p.com 43 " is a valid email address. It was sanitized to "a@p.com". 35 44 Invalid single addresses when 'multiple' attribute is not set. 36 45 PASS "invalid:email@example.com" is a invalid email address. … … 50 59 PASS "F/s/f/a@feo+re.com" is a invalid email address. 51 60 PASS "some+long+email+address@some+host-weird-/looking.com" is a invalid email address. 52 PASS " " is a invalid email address.53 PASS " a@p.com" is a invalid email address.54 PASS "a@p.com " is a invalid email address.55 PASS " a@p.com " is a invalid email address.56 PASS " a@p.com " is a invalid email address.57 PASS " a@p.com " is a invalid email address.58 PASS "59 a@p.com60 " is a invalid email address.61 PASS "62 a@p.com63 " is a invalid email address.64 PASS " a@p.com " is a invalid email address.65 PASS " a@p.com " is a invalid email address.66 61 PASS "a @p.com" is a invalid email address. 67 62 PASS "a @p.com" is a invalid email address. -
trunk/LayoutTests/fast/forms/input-value-sanitization-expected.txt
r97351 r116757 5 5 PASS input.value is "tkent@chromium.org,tkent@example.!!!" 6 6 Email without multiple: 7 PASS input.value is " tkent@chromium.org, tkent@example.***"7 PASS input.value is "tkent@chromium.org, tkent@example.***" 8 8 9 9 Number: -
trunk/LayoutTests/fast/forms/input-value-sanitization.html
r98407 r116757 22 22 input.type = 'email'; 23 23 input.setAttribute('value', ' tkent@chromium.org, tkent@example.*** \r\n'); 24 shouldBe('input.value', '" tkent@chromium.org, tkent@example.***"');24 shouldBe('input.value', '"tkent@chromium.org, tkent@example.***"'); 25 25 26 26 debug(''); -
trunk/LayoutTests/fast/forms/resources/ValidityState-typeMismatch-email.js
r98407 r116757 50 50 emailCheck("a\u000D@p.com", "a@p.com", expectValid); 51 51 emailCheck("", "", expectValid); 52 emailCheck(" ", "", expectValid); 53 emailCheck(" a@p.com", "a@p.com", expectValid); 54 emailCheck("a@p.com ", "a@p.com", expectValid); 55 emailCheck(" a@p.com ", "a@p.com", expectValid); 56 emailCheck("\u0020a@p.com\u0020", "a@p.com", expectValid); 57 emailCheck("\u0009a@p.com\u0009", "a@p.com", expectValid); 58 emailCheck("\u000Ca@p.com\u000C", "a@p.com", expectValid); 52 59 53 60 debug("Invalid single addresses when 'multiple' attribute is not set."); … … 68 75 emailCheck("F/s/f/a@feo+re.com", "F/s/f/a@feo+re.com", expectInvalid); 69 76 emailCheck("some+long+email+address@some+host-weird-/looking.com", "some+long+email+address@some+host-weird-/looking.com", expectInvalid); 70 emailCheck(" ", " ", expectInvalid);71 emailCheck(" a@p.com", " a@p.com", expectInvalid);72 emailCheck("a@p.com ", "a@p.com ", expectInvalid);73 emailCheck(" a@p.com ", " a@p.com ", expectInvalid);74 emailCheck("\u0020a@p.com\u0020", "\u0020a@p.com\u0020", expectInvalid);75 emailCheck("\u0009a@p.com\u0009", "\u0009a@p.com\u0009", expectInvalid);76 emailCheck("\u000Ba@p.com\u000B", "\u000Ba@p.com\u000B", expectInvalid);77 emailCheck("\u000Ca@p.com\u000C", "\u000Ca@p.com\u000C", expectInvalid);78 emailCheck("\u2003a@p.com\u2003", "\u2003a@p.com\u2003", expectInvalid);79 emailCheck("\u3000a@p.com\u3000", "\u3000a@p.com\u3000", expectInvalid);80 77 emailCheck("a @p.com", "a @p.com", expectInvalid); 81 78 emailCheck("a\u0020@p.com", "a\u0020@p.com", expectInvalid); -
trunk/Source/WebCore/ChangeLog
r116756 r116757 1 2012-05-11 Keishi Hattori <keishi@webkit.org> 2 3 Sanitization algorithm for input type=email should strip whitespaces 4 https://bugs.webkit.org/show_bug.cgi?id=86177 5 6 Reviewed by Kent Tamura. 7 8 No new tests. Covered by: fast/forms/ValidityState-typeMismatch-email.html 9 10 The spec says that the value sanitization algorithm should 11 > Strip line breaks from the value, then strip leading and trailing whitespace from the value. 12 13 * html/EmailInputType.cpp: 14 (WebCore::EmailInputType::sanitizeValue): 15 1 16 2012-05-11 Sheriff Bot <webkit.review.bot@gmail.com> 2 17 -
trunk/Source/WebCore/html/EmailInputType.cpp
r97351 r116757 97 97 String noLineBreakValue = proposedValue.removeCharacters(isHTMLLineBreak); 98 98 if (!element()->multiple()) 99 return noLineBreakValue;99 return stripLeadingAndTrailingHTMLSpaces(noLineBreakValue); 100 100 Vector<String> addresses; 101 101 noLineBreakValue.split(',', true, addresses);
Note: See TracChangeset
for help on using the changeset viewer.