-
-
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
Globbed dynamic route segments aren't URL-decoded in model()
hook params
#15059
Comments
It looks like this was also re-addressed in #4794 which was closed after the problem was (apparently?) fixed in 2.7. It seems that may have been a reference to tildeio/route-recognizer#91 which does seem like it should address this issue (specifically "Bugfix: inconsistent decoding of dynamic segments", though I may be misinterpreting) So not sure if maybe this should be filed over on that repo instead? |
@gabrielgrant would you be willing to make an example in an ember-twiddle ? see https://ember-twiddle.com |
It's a little strange, because, unlike a browser, the ember twiddle URL field accepts literal space characters, so you need to manually escape the spaces: Edit: strangely, although that link has a |
Ah, interesting. This only seems to happen when using the globbing pattern. Updated the twiddle so you can see it properly decoding non-globbed-matches now too |
model()
hook paramsmodel()
hook params
@gabrielgrant is this still an issue, perhaps we should close or create a new reproduction of this, what do you think? |
Seems fine in Ember v3.5, https://ember-twiddle.com/533c63cafba79951417e490f91957c2a?openFiles=twiddle.json%2C closing this out for now. |
Using current (as of 2017-03-23) versions of ember/ember-cli:
It seems this (or similar) issues were first addressed in #3263 which was closed in favor of a PR in #3545
#3545 is closed because of the existence of this patch from 2014, but AFAICS this it is created to urlencoding of address query params
Full example:
Given this
app/router.js
and this
app/routes/files/file.js
:Visiting http://localhost:4200/tmp/my%20file%20with%20spaces outputs
{"path":"/tmp/my%20file%20with%20spaces"}, {"path":"/tmp/my file with spaces"}
The text was updated successfully, but these errors were encountered: