Document invariants of percent-encode sets better#896
Conversation
|
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. |
| U+005B ([) to U+005D (]), inclusive, and U+007C (|). | ||
| <p>The <dfn oldids=userinfo-encode-set>userinfo percent-encode set</dfn> is a | ||
| <a>percent-encode set</a> consisting of the <a>path percent-encode set</a> and U+002F (/), | ||
| U+003A (:), U+003B (;), U+003D (=), U+0040 (@), U+005B ([) to U+005D (]), inclusive, and U+007C (|). |
There was a problem hiding this comment.
nit: this could have been explicit "5B, 5C, 5D" instead of "5B to 5D, inclusive"
that would make missing 5C less likely
There was a problem hiding this comment.
I'm going to keep this as-is for now as this is pre-existing and I think it's slightly more consistent. I could see making a new rule though that if a a range is 3 or less, you can't use the range syntax.
| <p>The <dfn export>component percent-encode set</dfn> is the <a>userinfo percent-encode set</a> and | ||
| U+0024 ($) to U+0026 (&), inclusive, U+002B (+), and U+002C (,). | ||
| <p>The <dfn export>component percent-encode set</dfn> is a <a>percent-encode set</a> consisting of | ||
| the <a>userinfo percent-encode set</a> and U+0024 ($) to U+0026 (&), inclusive, U+002B (+), and |
There was a problem hiding this comment.
nit: same here, could make missing 25 less likely
| inclusive, and U+007E (~). | ||
| <p>The <dfn><code>application/x-www-form-urlencoded</code> percent-encode set</dfn> is a | ||
| <a>percent-encode set</a> consisting of the <a>component percent-encode set</a> and U+0021 (!), | ||
| U+0027 (') to U+0029 RIGHT PARENTHESIS, inclusive, and U+007E (~). |
|
Side note: I added more cross-tests |
Fixes #895.