-
Notifications
You must be signed in to change notification settings - Fork 160
Document invariants of percent-encode sets better #896
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
base: main
Are you sure you want to change the base?
Conversation
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.
Yes, %1B(J%5C%1B(B matches what I'm getting there
And the diff \ -> %5C matches what I expect as \ should be escaped
Thanks!
|
Side note: having this as a test in WPT could be helpful to ensure that impls didn't use the wrong test Upd: ah, there is a full-range test for form/url, it just doesn't cover userinfo, but that's likely unreachable |
Also give them a proper type. Fixes #895.
5c50135 to
e52054e
Compare
|
That's a very good point. Which is probably also why I got the example wrong in the first place. I revised this PR with a more drastic change. |
url.bs
Outdated
| <td><a for=string>Percent-encode after encoding</a> with <a>Shift_JIS</a>, <var>input</var>, and | ||
| the <a><code>application/x-www-form-urlencoded</code> percent-encode set</a> | ||
| <td>"<code>1+1 ≡ 2%20‽</code>" | ||
| <td>"<code>1+1+%81%DF+2%20%26%238253%3B</code>" |
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.
this seems wrong
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.
application/x-www-form-urlencoded percent-encode set includes component percent-encode set which includes U+002B (+) and U+0025 (%)
- The first
+must be escaped (but not the second and third as they come from spaces) - The original
%is also escaped.
I get 1%2B1+%81%DF+2%2520%26%238253%3B in my impl
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.
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.
Oops, thanks for being on top of it! I double checked in Safari modulo the Shift_JIS aspect now.

Fixes #895.