-
Notifications
You must be signed in to change notification settings - Fork 60
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
Query Parameters not correctly decoded when comma is present #620
Comments
This is caused by EDIT: comma's are used for many of the JSONAPI specified qp's (sort, include, sparse fieldsets for as far as I can see). We might wan't to check if the key is one of those and only split on comma when that is the case? This should be safe as qp's aren't really nested. Another option is to check the controller attribute types and explode except when the type is string (though this might be prone to errors and mistakes in i.e. custom qp's). |
Just checked, the issue is also there for custom QP's. |
I'm also struggling with this - what is the correct way to escape the "," in a string to avoid this? AFAICT this isn't specified by the JSON API (https://jsonapi.org/format/#fetching-filtering). Edit: its used by Ember too by the looks of it when filtering by multiple ids. |
In an (encoded) URL like
/my-model?filter%5Bname%5D=MY%2C+Search+Term
which isfilter[name]= "MY, Search Term"
what Lux ends up with in the controller is:Which is clearly wrong. The URL as shown above is encoded by ember-data from passing:
The text was updated successfully, but these errors were encountered: