-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
link-to component no longer accepts special chars #14094
Comments
I think this is related to the fix of #4794. Not sure if we should consider this a bug or not. |
I think @bantic and/or @nathanhammond would have the best understanding of this. Would love for them to review/reply. |
The changes in question landed in Ember 2.7.0 (and have been reverted in current release branch, to be released as 2.7.2). They are still included (with bug fixes for the regressions identified) in the current beta (which will become 2.8.0). The changes regarding encoding/decoding of links (including dynamic segments) were made in tildeio/route-recognizer#91. There is specific discussion there about |
One of the changes in tildeio/route-recognizer#91 was to help make it so that route generation and recognition are symmetric (that is, generating a route with a dynamic segment would always create a string that would then be recognized by the route-recognizer). Before that change it was possible to generate routes that would not be recognized, for example, if you had the route After that PR the part of a dynamic segment is always encoded via I believe if you opt out of the improved encode/decode by setting |
For context, |
Thanks for the clarification @bantic! Seem overall like it's a good fix, but that some apps could get some nasty side-effects from it. 👍 Just one question: how can people set I naively tried setting: var ENV = {
RouteRecognizer: {
ENCODE_AND_DECODE_PATH_SEGMENTS: false,
},
} ... in the |
During route generation, for dynamic segments, do not percent-encode characters that, according to RFC 3986, are allowed in path segments. RFC 3986 defines "sub-delims" (these chars: `! $ & ' ( ) * + , ; =`) and specifies that they along with `:` and `@` are allowed in path segments in URIs. See: https://tools.ietf.org/html/rfc3986#section-3.3 This commit changes RouteRecognizers generation code for dynamic segments to explicitly avoid encoding those characters. Fixes emberjs/ember.js#14094
@t4t5 Hmm, looking now I'm not sure I have a fix for RR (here: bantic/route-recognizer@23455b6) that I will PR in a little bit after I have a chance to clean it up. |
During route generation for dynamic segments, do not percent-encode characters that, according to RFC 3986, are allowed in path segments. RFC 3986 defines "sub-delims" (these chars: `! $ & ' ( ) * + , ; =`) and specifies that they along with `:` and `@` do not need to be encoded in path segments in URIs. See: https://tools.ietf.org/html/rfc3986#section-3.3 This commit changes RouteRecognizer'ss generation code for dynamic segments to explicitly avoid encoding those characters. Fixes emberjs/ember.js#14094
@rwjblue Here's a PR that should fix the problem in RR: tildeio/route-recognizer#109 |
@bantic |
During route generation for dynamic segments, do not percent-encode characters that, according to RFC 3986, are allowed in path segments. RFC 3986 defines "sub-delims" (these chars: `! $ & ' ( ) * + , ; =`) and specifies that they along with `:` and `@` do not need to be encoded in path segments in URIs. See: https://tools.ietf.org/html/rfc3986#section-3.3 This commit changes RouteRecognizer'ss generation code for dynamic segments to explicitly avoid encoding those characters. Fixes emberjs/ember.js#14094
Addressed upstream, can be closed. |
Previously, it was possible to include the "@"-symbol in your URLs.
My router looks like this:
... and I could redirect to the path this way:
This worked in 2.5 (it transitioned to
/@tristan
), but in the recent versions it instead changes the URL to/%40tristan
.What's the reason for this change, and is there a way to turn it off?
The text was updated successfully, but these errors were encountered: