-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add percentEncodeAfterEncoding #37
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
Conversation
6ab73f8 to
9b8fd67
Compare
56052c5 to
eacc182
Compare
|
@domenic I think the spec is wrong |
11c6dfc to
3628d3a
Compare
3628d3a to
f8e5f94
Compare
3a3b77f to
9b7f280
Compare
56ca4f6 to
d30e288
Compare
|
I'm planning to add more cross-tests with browsers and merge this soon. |
9b7f280 to
931a8b1
Compare
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.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c5ce31c to
462c3da
Compare
462c3da to
439fee1
Compare
cc @domenic
Ref: https://url.spec.whatwg.org/#string-percent-encode-after-encoding
Api
C0 control percent-encode set is always percent-encoded (below U+0020, U+007F, above U+007F).
Other chars to encode are specified as a literal string
percentEncodeSet, containing unique increasing codepoints in range0x20-0x7e. No sets except C0 are hardcoded.I made this non-fatal, unlike
encodeURIComponentit now normalizes the input to a well-formed string. I can revert that and throw on non-scalarvalue strings instead.The only thing that's not acceptable there is trusting the input to be scalarvalue and returning e.g.
�on\d800In the actual usage all input to the spec-defined method is expected to be scalarvalue.