-
Notifications
You must be signed in to change notification settings - Fork 142
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
Should we escape \ in non-special non-opaque paths? #675
Comments
I think a lot of these proposals would be easier to do once Chrome has proper non-special URL support. For better or worse they're in the best position to judge what changes can be made. |
In any case. From the perspective of relative URLs, this is a good thing to do. The standard does not currently support parsing or serialising those, so decisions are often not checked against their implications for relative URLs either. This means that it is left up to implementors of URL manipulation libraries to define a customised version of WHATWG URL normalisation that avoids reparse bugs for relative URLs and avoids as much ambiguity around scheme dependent parsing behaviour as possible. Of course, the interpretation of |
Chrome Canary appears to have non-special URL support of some kind. Unclear to me if this is already shipping. But it does not escape Closing based on that, but please leave a comment if this needs to be reconsidered. |
I would want to leave a note. It seems that this decision (whether or not to encode the I think that it is a bit short sighted, or let’s say; not taking into account and/or weighing other aspects; not weighing the trade offs being made. The It is a very unpleasant property that parsing e.g. Of course, for changing the scheme of e.g. an http URL to one that has traditionally been used with opaque paths such as It makes it so that the semantics of URLs is non-compositional. You can no longer replace equals for equals, you can no longer use algebraic reasoning. I am not sure that can be fully recovered, but preventing the parser/ normaliser from producing URLs with such a problem code point as much as possible seems very important to me. Single and double quotes and angle brackets too are required to be percent encoded. IIRC this has not always been consistent across browsers either. They are used as delimiters in html and xml and json, JavaScript, other context that URLs may appear in, so it can cause issues to not escape them and it was changed without problems. It doesn’t make sense to me to NOT require the same for |
Well part of the tradeoff here that I didn't mention is compatibility. And that's the most important one. |
You know what, scratch my previous comment. Let’s take a step back. I have never seen an hierarchical URL with a Isn’t it way better to just treat any Better backward compatibility, much simpler parser, fewer special cases. The current alignment is cool, but you will manage to get that again, don’t let it prevent us from making solid improvements. |
Pros:
Cons:
Originally suggested by @karwa in #651 (comment).
The text was updated successfully, but these errors were encountered: