-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
URL/Encoding: change query state parsing #10915
Conversation
Note: I looked into removing Perhaps further cleanup here can be done as part of #10636. |
This needs to change #10891 as well. I haven't corrected it there to keep the state of the test suite consistent. |
39db988
to
361b63f
Compare
That's now done. This as well the URL Standard change are ready for review. |
Note to self: once this is reviewed and landed, do some work on #4934 again. |
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.
lgtm
0551797
to
bd7ea53
Compare
(I merged the commits together so that "rebase and merge" can be used by an owner. This needs an override due to build timeouts. However, please do not merge this before I remove that label.) |
Also, thanks @inexorabletash for the speedy review! |
If the input to the URL parser contains code points outside the non-UTF-8 encoding's value space and the URL parser was invoked using a non-UTF-8 encoding, then those code points end up as &#...;. The problem is that &, #, and ; are also URL separators, but the previous algorithm would only encode #. This ensures that & and ; are also encoded, as some browsers already do, but only if they came about as the result of the encode operation. Tests: web-platform-tests/wpt#10915.
bd7ea53
to
d5b8565
Compare
I rebased this to address a merge conflict in |
If the input to the URL parser contains code points outside the non-UTF-8 encoding's value space and the URL parser was invoked using a non-UTF-8 encoding, then those code points end up as &#...;. The problem is that &, #, and ; are also URL separators, but the previous algorithm would only encode #. This ensures that & and ; are also encoded, as some browsers already do, but only if they came about as the result of the encode operation. Tests: web-platform-tests/wpt#10915. Fixes whatwg/encoding#139.
If the input to the URL parser contains code points outside the non-UTF-8 encoding's value space and the URL parser was invoked using a non-UTF-8 encoding, then those code points end up as &#...;. The problem is that &, #, and ; are also URL separators, but the previous algorithm would only encode #. This ensures that & and ; are also encoded, as some browsers already do, but only if they came about as the result of the encode operation. Tests: web-platform-tests/wpt#10915. Fixes whatwg/encoding#139.
See whatwg/encoding#139 for rationale and whatwg/url#386 for the change to the URL Standard. (I found all these resources in part due to @rakuco's work on trying to align Chrome with the earlier iteration of the specification.)
d5b8565
to
6dc57cd
Compare
See whatwg/encoding#139 for rationale and whatwg/url#386 for the change to the URL Standard.
(I found all these resources in part due to @rakuco's work on trying to align Chrome with the earlier iteration of the specification.)