-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should protocol setter remove tabs and newline? #609
Comments
This makes setters of Location.search, HTMLAnchorElement.hash, URL.pathname, etc., remove tabs and newlines. This aligns with the WHATWG URL Standard and Safari, as well as Firefox partially. There are a few exceptions. SetProtocol is unchanged due to an upstream spec issue [1]. SetUser and SetPass should not remove tabs and newlines per spec. [1]: whatwg/url#609 Bug: 1214932 Change-Id: I3bcb6fa9e3b61ee5a0a03b13eca93d42912afb22
This makes setters of Location.search, HTMLAnchorElement.hash, URL.pathname, etc., remove tabs and newlines. This aligns with the WHATWG URL Standard and Safari, as well as Firefox partially. There are a few exceptions. SetProtocol is unchanged due to an upstream spec issue [1]. SetUser and SetPass should not remove tabs and newlines per spec. [1]: whatwg/url#609 Bug: 1214932 Change-Id: I3bcb6fa9e3b61ee5a0a03b13eca93d42912afb22
This makes setters of Location.search, HTMLAnchorElement.hash, URL.pathname, etc., remove tabs and newlines. This aligns with the WHATWG URL Standard and Safari, as well as Firefox partially. There are a few exceptions. SetProtocol is unchanged due to an upstream spec issue [1]. SetUser and SetPass should not remove tabs and newlines per spec. [1]: whatwg/url#609 Bug: 1214932 Change-Id: I3bcb6fa9e3b61ee5a0a03b13eca93d42912afb22 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2928080 Reviewed-by: Kent Tamura <[email protected]> Commit-Queue: Timothy Gu <[email protected]> Cr-Commit-Position: refs/heads/master@{#888804}
This makes setters of Location.search, HTMLAnchorElement.hash, URL.pathname, etc., remove tabs and newlines. This aligns with the WHATWG URL Standard and Safari, as well as Firefox partially. There are a few exceptions. SetProtocol is unchanged due to an upstream spec issue [1]. SetUser and SetPass should not remove tabs and newlines per spec. [1]: whatwg/url#609 Bug: 1214932 Change-Id: I3bcb6fa9e3b61ee5a0a03b13eca93d42912afb22 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2928080 Reviewed-by: Kent Tamura <[email protected]> Commit-Queue: Timothy Gu <[email protected]> Cr-Commit-Position: refs/heads/master@{#888804}
This makes setters of Location.search, HTMLAnchorElement.hash, URL.pathname, etc., remove tabs and newlines. This aligns with the WHATWG URL Standard and Safari, as well as Firefox partially. There are a few exceptions. SetProtocol is unchanged due to an upstream spec issue [1]. SetUser and SetPass should not remove tabs and newlines per spec. [1]: whatwg/url#609 Bug: 1214932 Change-Id: I3bcb6fa9e3b61ee5a0a03b13eca93d42912afb22 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2928080 Reviewed-by: Kent Tamura <[email protected]> Commit-Queue: Timothy Gu <[email protected]> Cr-Commit-Position: refs/heads/master@{#888804}
I don't have a strong feeling here, but I lean toward keeping protocol consistent with all other invocations of the URL parser and getting all browsers to update. It seems pretty gross to have a special carve-out for one particular state override. On the other hand, when all three browsers do something, probably the spec should be updated to match it, even if that thing is really weird. I'm curious what @achristensen07 thinks... |
…er inputs, a=testonly Automatic update from web-platform-tests kurl: remove tabs and newlines from setter inputs This makes setters of Location.search, HTMLAnchorElement.hash, URL.pathname, etc., remove tabs and newlines. This aligns with the WHATWG URL Standard and Safari, as well as Firefox partially. There are a few exceptions. SetProtocol is unchanged due to an upstream spec issue [1]. SetUser and SetPass should not remove tabs and newlines per spec. [1]: whatwg/url#609 Bug: 1214932 Change-Id: I3bcb6fa9e3b61ee5a0a03b13eca93d42912afb22 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2928080 Reviewed-by: Kent Tamura <[email protected]> Commit-Queue: Timothy Gu <[email protected]> Cr-Commit-Position: refs/heads/master@{#888804} -- wpt-commits: 8c1254ac85f709e6a8a6baa7e6c11f9c1fc39e93 wpt-pr: 29168
…er inputs, a=testonly Automatic update from web-platform-tests kurl: remove tabs and newlines from setter inputs This makes setters of Location.search, HTMLAnchorElement.hash, URL.pathname, etc., remove tabs and newlines. This aligns with the WHATWG URL Standard and Safari, as well as Firefox partially. There are a few exceptions. SetProtocol is unchanged due to an upstream spec issue [1]. SetUser and SetPass should not remove tabs and newlines per spec. [1]: whatwg/url#609 Bug: 1214932 Change-Id: I3bcb6fa9e3b61ee5a0a03b13eca93d42912afb22 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2928080 Reviewed-by: Kent Tamura <[email protected]> Commit-Queue: Timothy Gu <[email protected]> Cr-Commit-Position: refs/heads/master@{#888804} -- wpt-commits: 8c1254ac85f709e6a8a6baa7e6c11f9c1fc39e93 wpt-pr: 29168
Given that all browsers agree on behavior, I think we should change the spec to match behavior in this case |
I guess I don't have a strong opinion here. I don't think there will be a lot of compatibility issues if we change this. |
Should we at least update the tests to be consistent with the current specs? I also found that http://wpt.live/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-weird.html and http://wpt.live/url/url-setters-a-area.window.html also contradict each other. |
Yeah, we should definitely update the tests to be self-consistent, and probably it's best to align them with the current spec. (Unless we want to update the spec, which I think everyone is OK with, but nobody is insisting on...) |
This makes setters of Location.search, HTMLAnchorElement.hash, URL.pathname, etc., remove tabs and newlines. This aligns with the WHATWG URL Standard and Safari, as well as Firefox partially. There are a few exceptions. SetProtocol is unchanged due to an upstream spec issue [1]. SetUser and SetPass should not remove tabs and newlines per spec. [1]: whatwg/url#609 Bug: 1214932 Change-Id: I3bcb6fa9e3b61ee5a0a03b13eca93d42912afb22 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2928080 Reviewed-by: Kent Tamura <[email protected]> Commit-Queue: Timothy Gu <[email protected]> Cr-Commit-Position: refs/heads/master@{#888804} NOKEYCHECK=True GitOrigin-RevId: 4b9226ad340958376943b8e10a224363169b3b98
#61 added the tests in OP, but #101 was fixed before that and somehow not taken into account. So it seem this was an oversight. I don't think there is an inconsistency between the tests @achristensen07 points towards. There are different requirements for I created web-platform-tests/wpt#38032 to update the incorrect tests and add some missing scenarios. Suggestions welcome. Once those are reviewed I'll file implementation bugs and then we can close this issue in my opinion. |
Bugs: |
…sts, a=testonly Automatic update from web-platform-tests URL and HTML: correct protocol setter tests For whatwg/url#609. -- wpt-commits: 865a920dd12159c324560f482288094088cba1ce wpt-pr: 38032
…sts, a=testonly Automatic update from web-platform-tests URL and HTML: correct protocol setter tests For whatwg/url#609. -- wpt-commits: 865a920dd12159c324560f482288094088cba1ce wpt-pr: 38032
…,necko-reviewers,valentin Strip tabs, new lines, and carriage returns from the input given to protocol setters for Location, URL, and Link. Also updated WPT expectations. Reference: whatwg/url#609 Differential Revision: https://phabricator.services.mozilla.com/D170404
…,necko-reviewers,valentin Strip tabs, new lines, and carriage returns from the input given to protocol setters for Location, URL, and Link. Also updated WPT expectations. Reference: whatwg/url#609 Differential Revision: https://phabricator.services.mozilla.com/D170404
…,necko-reviewers,valentin Strip tabs, new lines, and carriage returns from the input given to protocol setters for Location, URL, and Link. Also updated WPT expectations. Reference: whatwg/url#609 Differential Revision: https://phabricator.services.mozilla.com/D170404
…,necko-reviewers,valentin Strip tabs, new lines, and carriage returns from the input given to protocol setters for Location, URL, and Link. Also updated WPT expectations. Reference: whatwg/url#609 Differential Revision: https://phabricator.services.mozilla.com/D170404
…sts, a=testonly Automatic update from web-platform-tests URL and HTML: correct protocol setter tests For whatwg/url#609. -- wpt-commits: 865a920dd12159c324560f482288094088cba1ce wpt-pr: 38032
Consider the following test:
On Chrome, Firefox, and Safari,
u.href
retains the originalhttps
protocol. This behavior as it relates to the Location object is in fact tested by WPT(!): search for\x0A
in html/browsers/history/the-location-interface/location-protocol-setter.html.The text was updated successfully, but these errors were encountered: