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
Percent-encode additional characters in "fragment state". #347
Conversation
Currently, we percent-encode characters in "fragment state" using the C0 control percent-encode set. Firefox encodes more than that, and it seems reasonable to align around that behavior for reasons spelled out in #291 and the comments of #344. This patch adds a new "fragment percent-encode set" which contains the C0 control percent-encode set, along with: * 0x22 (") * 0x3C (<) * 0x3E (>) * 0x60 (`) Closes #344.
I'll put tests together shortly. |
Tests for the new percent-encoding rules introduced in whatwg/url#347.
url.bs
Outdated
@@ -177,6 +177,9 @@ U+003E (>), U+003F (?), U+0060 (`), U+007B ({), and U+007D (}). | |||
<a>path percent-encode set</a> and U+002F (/), U+003A (:), U+003B (;), U+003D (=), U+0040 (@), | |||
U+005B ([), U+005C (\), U+005D (]), U+005E (^), and U+007C (|). | |||
|
|||
<p>The <dfn>fragment percent-encode set</dfn> is the <a>C0 control percent-encode set</a> and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we try to define path percent-encode set as a superset of fragment percent-encode set, for parity with userinfo->path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me. Poked at it in f258f4d. WDYT?
url.bs
Outdated
@@ -169,9 +169,11 @@ contains bytes that are not <a>ASCII bytes</a> might be insecure and is not reco | |||
<p>The <dfn oldids=simple-encode-set>C0 control percent-encode set</dfn> are the <a>C0 controls</a> | |||
and all <a>code points</a> greater than U+007E (~). | |||
|
|||
<p>The <dfn>fragment percent-encode set</dfn> is the <a>C0 control percent-encode set</a> and | |||
U+0022 SPACE, U+0022 ("), U+003C(<), U+003E (>), and U+0060 (`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
U+0020 SPACE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. That was super-dumb. Fixed in d1d85b2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final nit I suspect, other than getting the tests in order.
url.bs
Outdated
@@ -169,9 +169,11 @@ contains bytes that are not <a>ASCII bytes</a> might be insecure and is not reco | |||
<p>The <dfn oldids=simple-encode-set>C0 control percent-encode set</dfn> are the <a>C0 controls</a> | |||
and all <a>code points</a> greater than U+007E (~). | |||
|
|||
<p>The <dfn>fragment percent-encode set</dfn> is the <a>C0 control percent-encode set</a> and | |||
U+0020 SPACE, U+0022 ("), U+003C(<), U+003E (>), and U+0060 (`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after U+003C.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting for web-platform-tests/wpt#7641 now.
The OP/commit message omit U+0020 space |
Implements the changes to fragment processing described in whatwg/url#347, which adds a new "fragment percent-encode set" which contains the C0 control percent-encode set, along with: * 0x20 SPACE * 0x22 (") * 0x3C (<) * 0x3E (>) * 0x60 (`) This brings our implementation into line with Firefox. Bug: 758523 Change-Id: I25de642017ccb69473626a327ad194b3431a11ed
Tests moved to web-platform-tests/wpt#7776 though setter tests are not updated. Seems like jsdom doesn't run those. |
Implements the changes to fragment processing described in whatwg/url#347, which adds a new "fragment percent-encode set" which contains the C0 control percent-encode set, along with: * 0x20 SPACE * 0x22 (") * 0x3C (<) * 0x3E (>) * 0x60 (`) This brings our implementation into line with Firefox. Bug: 758523 Change-Id: I25de642017ccb69473626a327ad194b3431a11ed
Implements the changes to fragment processing described in whatwg/url#347, which adds a new "fragment percent-encode set" which contains the C0 control percent-encode set, along with: * 0x20 SPACE * 0x22 (") * 0x3C (<) * 0x3E (>) * 0x60 (`) This brings our implementation into line with Firefox. Bug: 758523 Change-Id: I25de642017ccb69473626a327ad194b3431a11ed
Implements the changes to fragment processing described in whatwg/url#347, which adds a new "fragment percent-encode set" which contains the C0 control percent-encode set, along with: * 0x20 SPACE * 0x22 (") * 0x3C (<) * 0x3E (>) * 0x60 (`) This brings our implementation into line with Firefox. Bug: 758523 Change-Id: I25de642017ccb69473626a327ad194b3431a11ed
Implements the changes to fragment processing described in whatwg/url#347, which adds a new "fragment percent-encode set" which contains the C0 control percent-encode set, along with: * 0x20 SPACE * 0x22 (") * 0x3C (<) * 0x3E (>) * 0x60 (`) This brings our implementation into line with Firefox. Bug: 758523 Change-Id: I25de642017ccb69473626a327ad194b3431a11ed
Implements the changes to fragment processing described in whatwg/url#347, which adds a new "fragment percent-encode set" which contains the C0 control percent-encode set, along with: * 0x20 SPACE * 0x22 (") * 0x3C (<) * 0x3E (>) * 0x60 (`) This brings our implementation into line with Firefox. Bug: 758523 Change-Id: I25de642017ccb69473626a327ad194b3431a11ed
Implements the changes to fragment processing described in whatwg/url#347, which adds a new "fragment percent-encode set" which contains the C0 control percent-encode set, along with: * 0x20 SPACE * 0x22 (") * 0x3C (<) * 0x3E (>) * 0x60 (`) This brings our implementation into line with Firefox. Bug: 758523 Change-Id: I25de642017ccb69473626a327ad194b3431a11ed
Implements the changes to fragment processing described in whatwg/url#347, which adds a new "fragment percent-encode set" which contains the C0 control percent-encode set, along with: * 0x20 SPACE * 0x22 (") * 0x3C (<) * 0x3E (>) * 0x60 (`) This brings our implementation into line with Firefox. Bug: 758523 Change-Id: I25de642017ccb69473626a327ad194b3431a11ed
Implements the changes to fragment processing described in whatwg/url#347, which adds a new "fragment percent-encode set" which contains the C0 control percent-encode set, along with: * 0x20 SPACE * 0x22 (") * 0x3C (<) * 0x3E (>) * 0x60 (`) This brings our implementation into line with Firefox. Bug: 758523 Change-Id: I25de642017ccb69473626a327ad194b3431a11ed
Snapping back to this after @noncombatant pinged the internal bug. Sorry I lost the thread. @domenic, @annevk: Does the current set of tests on web-platform-tests/wpt#7776 make sense to you? If so, I think we're done here. :) If not, I'll fix them. |
Looks good to me, but I'll let @domenic verify with the jsdom impl. |
Implements the changes to fragment processing described in whatwg/url#347, which adds a new "fragment percent-encode set" which contains the C0 control percent-encode set, along with: * 0x20 SPACE * 0x22 (") * 0x3C (<) * 0x3E (>) * 0x60 (`) This brings our implementation into line with Firefox. Bug: 758523 Change-Id: I25de642017ccb69473626a327ad194b3431a11ed
Tests are still not quite right, so it's worth straightening that out first. |
Implements the changes to fragment processing described in whatwg/url#347, which adds a new "fragment percent-encode set" which contains the C0 control percent-encode set, along with: * 0x20 SPACE * 0x22 (") * 0x3C (<) * 0x3E (>) * 0x60 (`) This brings our implementation into line with Firefox. Bug: 758523 Change-Id: I25de642017ccb69473626a327ad194b3431a11ed
Implements the changes to fragment processing described in whatwg/url#347, which adds a new "fragment percent-encode set" which contains the C0 control percent-encode set, along with: * 0x20 SPACE * 0x22 (") * 0x3C (<) * 0x3E (>) * 0x60 (`) This brings our implementation into line with Firefox. Bug: 758523 Change-Id: I25de642017ccb69473626a327ad194b3431a11ed
Tests good, this (and its tests) can be merged :) |
Implements the changes to fragment processing described in whatwg/url#347, which adds a new "fragment percent-encode set" which contains the C0 control percent-encode set, along with: * 0x20 SPACE * 0x22 (") * 0x3C (<) * 0x3E (>) * 0x60 (`)
@mikewest could you file implementation bugs? I'm guessing just for Edge/Safari? |
WebKit: https://bugs.webkit.org/show_bug.cgi?id=180396 |
Thanks, I emailed some folks at Microsoft to look into that, since it makes reporting bugs against Edge much harder than it should be. |
Implements the changes to fragment processing described in whatwg/url#347, which adds a new "fragment percent-encode set" which contains the C0 control percent-encode set, along with: * 0x20 SPACE * 0x22 (") * 0x3C (<) * 0x3E (>) * 0x60 (`) This brings our implementation into line with Firefox. Bug: 758523 Change-Id: I25de642017ccb69473626a327ad194b3431a11ed Reviewed-on: https://chromium-review.googlesource.com/719004 Commit-Queue: Mike West <mkwst@chromium.org> Reviewed-by: Jochen Eisinger <jochen@chromium.org> Cr-Commit-Position: refs/heads/master@{#523383}
For the record, chromium bug here: https://bugs.chromium.org/p/chromium/issues/detail?id=803103 |
Percent-encode UTF8 characters in URL fragment identifiers. This brings us into line with Firefox, Safari, and the spec. Bug: 758523 Reviewed-on: https://chromium-review.googlesource.com/668363 Commit-Queue: Mike West <mkwst@chromium.org> Reviewed-by: Jochen Eisinger <jochen@chromium.org> Reviewed-by: Andy Paicu <andypaicu@chromium.org> Cr-Commit-Position: refs/heads/master@{#507481} Encode ' ', '"', '<', '>', and '`' in URL fragments. Implements the changes to fragment processing described in whatwg/url#347, which adds a new "fragment percent-encode set" which contains the C0 control percent-encode set, along with: * 0x20 SPACE * 0x22 (") * 0x3C (<) * 0x3E (>) * 0x60 (`) This brings our implementation into line with Firefox. Bug: 758523 Reviewed-on: https://chromium-review.googlesource.com/719004 Commit-Queue: Mike West <mkwst@chromium.org> Reviewed-by: Jochen Eisinger <jochen@chromium.org> Cr-Commit-Position: refs/heads/master@{#523383} Change-Id: I25de642017ccb69473626a327ad194b3431a11ed Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Implements the changes to fragment processing described in whatwg/url#347, which adds a new "fragment percent-encode set" which contains the C0 control percent-encode set, along with: * 0x20 SPACE * 0x22 (") * 0x3C (<) * 0x3E (>) * 0x60 (`) This brings our implementation into line with Firefox. Bug: 758523 Change-Id: I25de642017ccb69473626a327ad194b3431a11ed Reviewed-on: https://chromium-review.googlesource.com/719004 Commit-Queue: Mike West <mkwst@chromium.org> Reviewed-by: Jochen Eisinger <jochen@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#523383} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 01c25d47d2d22456368363e576083d766eedf8f6
Implements the changes to fragment processing described in whatwg/url#347, which adds a new "fragment percent-encode set" which contains the C0 control percent-encode set, along with: * 0x20 SPACE * 0x22 (") * 0x3C (<) * 0x3E (>) * 0x60 (`) This brings our implementation into line with Firefox. Bug: 758523 Change-Id: I25de642017ccb69473626a327ad194b3431a11ed Reviewed-on: https://chromium-review.googlesource.com/719004 Commit-Queue: Mike West <mkwst@chromium.org> Reviewed-by: Jochen Eisinger <jochen@chromium.org> Cr-Commit-Position: refs/heads/master@{#523383} Former-commit-id: 01c25d47d2d22456368363e576083d766eedf8f6
Currently, we percent-encode characters in "fragment state" using the C0
control percent-encode set. Firefox encodes more than that, and it seems
reasonable to align around that behavior for reasons spelled out in #291
and the comments of #344.
This patch adds a new "fragment percent-encode set" which contains the
C0 control percent-encode set, along with:
Closes #344.
Preview | Diff