Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
url: percent-encode more characters in path URL queries
In particular, make sure to percent-encode # as otherwise URL setters may fail roundtripping: u = new URL("abc:hello?query#frag"); u.search = "?query#bad"; console.log(u.href); // before: "abc:hello?query#bad#frag" // after: "abc:hello?query%23bad#frag" New behavior matches Safari and the spec, except for the apostrophe character: Chrome encodes ' in non-special URL queries but not Safari or the spec. Bug: 1212545 Change-Id: Ie3b14f84bda664169f13ea36a4f739e2eb4ebc8b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2891251 Reviewed-by: Mike West <mkwst@chromium.org> Commit-Queue: Timothy Gu <timothygu@chromium.org> Cr-Commit-Position: refs/heads/master@{#907326}
- Loading branch information
Showing
25 changed files
with
60 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
third_party/blink/web_tests/http/tests/security/no-popup-from-sandbox-top-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
CONSOLE ERROR: line 3: Unsafe attempt to initiate navigation for frame with URL 'http://127.0.0.1:8000/security/no-popup-from-sandbox-top.html' from frame with URL 'data:text/html,%0A <script>%0A var win = window.open('about:blank', '_top');%0A console.log(win ? 'FAIL' : 'PASS');%0A </script>'. The frame attempting navigation of the top-level window is sandboxed, but the flag of 'allow-top-navigation' or 'allow-top-navigation-by-user-activation' is not set. | ||
CONSOLE ERROR: line 3: Unsafe attempt to initiate navigation for frame with URL 'http://127.0.0.1:8000/security/no-popup-from-sandbox-top.html' from frame with URL 'data:text/html,%0A <script>%0A var win = window.open('about:blank', '_top');%0A console.log(win ?%20%27FAIL%27%20:%20%27PASS%27);%0A%20%20%20%20%20%20%20%3C/script%3E'. The frame attempting navigation of the top-level window is sandboxed, but the flag of 'allow-top-navigation' or 'allow-top-navigation-by-user-activation' is not set. | ||
|
||
CONSOLE MESSAGE: line 4: PASS | ||
To run this test outside of DumpRenderTree, please disable your popup blocker! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
third_party/blink/web_tests/platform/fuchsia/fast/url/invalid-urls-utf8-expected.txt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.