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

Issue 836113002: Input type url with line break and leading-trailing whitespace should be stripped. (Closed)

Created:
5 years, 11 months ago by prashant.hiremath
Modified:
5 years, 10 months ago
CC:
blink-reviews, dglazkov+blink, blink-reviews-html_chromium.org, keishi
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Input type url with line break and leading-trailing whitespace should be stripped. According to spec https://html.spec.whatwg.org/multipage/forms.html#url-state-%28type=url%29, we have to strip the line break and leading-trailing whitespaces from the url value, so added santization algorithm to strip the line break and leading-trailing whitespaces. Firefox works according to spec and strips the linebreak and whitespaces from value. BUG=446108 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=188106

Patch Set 1 #

Patch Set 2 : Update 1 : Used testharness.js for LayoutTests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -0 lines) Patch
A LayoutTests/fast/forms/url-with-line-break-and-whitespace.html View 1 1 chunk +22 lines, -0 lines 0 comments Download
M Source/core/html/forms/URLInputType.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/forms/URLInputType.cpp View 2 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (4 generated)
prashant.hiremath
Please Review.
5 years, 11 months ago (2015-01-06 07:10:12 UTC) #2
mlamouri (slow - plz ping)
Could you also strip the line breaks in that CL? Sounds like you want to ...
5 years, 11 months ago (2015-01-06 10:14:39 UTC) #4
prashant.hiremath
On 2015/01/06 10:14:39, Mounir Lamouri wrote: > Could you also strip the line breaks in ...
5 years, 11 months ago (2015-01-06 11:09:58 UTC) #5
mlamouri (slow - plz ping)
On 2015/01/06 11:09:58, prashant.hiremath wrote: > On 2015/01/06 10:14:39, Mounir Lamouri wrote: > > Could ...
5 years, 11 months ago (2015-01-06 12:05:13 UTC) #6
prashant.hiremath
Thanks for the review Mounir. I have updated LayoutTest using testharness.js, PTAL.
5 years, 11 months ago (2015-01-07 12:32:59 UTC) #7
mlamouri (slow - plz ping)
lgtm, thanks! :)
5 years, 11 months ago (2015-01-07 12:59:34 UTC) #8
eae
LGTM
5 years, 11 months ago (2015-01-08 19:56:58 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/836113002/20001
5 years, 11 months ago (2015-01-09 02:22:56 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://src.chromium.org/viewvc/blink?view=rev&revision=188106
5 years, 11 months ago (2015-01-09 03:33:45 UTC) #12
tkent
I have a concern about this change. What happens if a user types spaces into ...
5 years, 10 months ago (2015-02-02 07:21:10 UTC) #14
prashant.hiremath
On 2015/02/02 07:21:10, available but slow wrote: > I have a concern about this change. ...
5 years, 10 months ago (2015-02-03 04:43:43 UTC) #15
tkent
On 2015/02/03 04:43:43, prashant.hiremath wrote: > On 2015/02/02 07:21:10, available but slow wrote: > > ...
5 years, 10 months ago (2015-02-03 05:01:09 UTC) #16
prashant.hiremath
On 2015/02/03 05:01:09, available but slow wrote: > On 2015/02/03 04:43:43, prashant.hiremath wrote: > > ...
5 years, 10 months ago (2015-02-03 08:45:41 UTC) #17
mlamouri (slow - plz ping)
> So, Firefox doesn't sanitize user-input strings? Firefox let the user type whatever they want ...
5 years, 10 months ago (2015-02-03 09:53:10 UTC) #18
tkent
On 2015/02/03 08:45:41, prashant.hiremath wrote: > After I revert my changes, case 1 will work ...
5 years, 10 months ago (2015-02-04 00:20:55 UTC) #19
prashant.hiremath
5 years, 10 months ago (2015-02-04 11:54:40 UTC) #20
Message was sent while issue was closed.
A revert of this CL (patchset #2 id:20001) has been created in
https://codereview.chromium.org/893013003/ by prashhir@cisco.com.

The reason for reverting is: Reverting this Patch, as this will break the old
behavior of browser in case of user types spaces into input box type url.

It need to be discussed with wider audience, what should be the correct behavior
in case of user inputting and JavaScript setting the input value, to reland this
patch.
.

Powered by Google App Engine
This is Rietveld 408576698