Using Ember 2.13.2. If I have the following route:
this.route('foobar', { path: '/:id' });
And in routes/foobar.js
I have:
model (params) {
console.log(params);
}
When I hit /[@:
I will get /%5B@:
in the browser URL and id: "[@:"
in the console. If I hit /%5B%40
I will get /%5B@
in the browser URL and id: "[@"
in the console. The console.logs are correct, but I’m wondering about the browser URL. Why are some symbols encoded? Why are some symbols decoded? Why isn’t this consistent with encodeURIComponent
which will actually encode all of these symbols ([
, @
and :
)? Is the function for encoding that is used internally exposed somewhere so I could use it for my own routes which have globbed dynamic segments in order to be consistent with Ember?