Closed heartsentwined closed 10 years ago
Thanks for pointing out this gotcha. This feels like something related to Ember.js proper?
I'm not sure which is the expected responsibility: should the params
object perform decoding or faithfully represent the raw URL? or should the ID stringifier / normalizer catch this and decode it as part of normalization?
I'll report this at ember too.
I believe this to be an Ember.js issue, am going to close and we can track there.
This is either a bug, or just a gotcha report for future googlers.
Whenever
params.search_term
include a url-encoded string, the above will throw several of this:The url-encoded string is the default in ember, however. Let's say your entry URL is
/search/便
(just a random non-safe character), the params object will give youObject {search_term: "%E4%BE%BF"}
.The fix / workaround:
(A further step can be taken to translate
+
into`, which
decodeURIComponent` doesn't do.)Sidenote: the server - rails in my case - happily accepts the request in both cases, and processes them correctly.