Skip to content
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

Decode URI components for nested object keys #106

Merged
merged 1 commit into from Sep 14, 2015

Conversation

drarmstr
Copy link
Contributor

@drarmstr drarmstr commented Sep 3, 2015

Resolve a bug where backbone-queryparams will properly URL decode values, but not object keys. For example …#...?key.foo%20bar=eggs%20spam will translate to { “key”: { “foo%20bar”: “eggs spam” } }.

The fix is a simple change in backbone.queryparams.js:

var part = parts[i];

becomes:

var part = decodeURIComponent(parts[i]);

@drarmstr
Copy link
Contributor Author

drarmstr commented Sep 8, 2015

Or would you prefer to use parseParams() instead of decodeURIComponent() directly?

jhudson8 added a commit that referenced this pull request Sep 14, 2015
Decode URI components for nested object keys
@jhudson8 jhudson8 merged commit d6fb511 into jhudson8:master Sep 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants