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 string parameters are not URI-decoded in route.query #8429
Comments
I tried to reproduce code above on codesandbox but seems query parameters are properly decoded:
@ydnar Is it happening for |
I'm encountering the same issue on nuxt v2.14.9 ( |
@pi0 I don’t know how to get that sandbox to run modified code, but if you change the link to use URI-encoded commas, it should break:
|
https://codesandbox.io/s/objective-burnell-xd9z5?file=/pages/index.vue https://xd9z5.sse.codesandbox.io/?t=food%2Ccoffee {"terms":"food%2Ccoffee","results":[]} |
Whew. Glad it wasn’t our monkeypatching of the |
Problem solved on my app 🎉 thank you @pi0 |
Thank you @pi0! Much appreciated. |
Versions
Reproduction
Since updating to nuxt v2.14.8, query string parameters with encoded characters are passed un-decoded in
route.query
incontext
toasyncData
. The v2.14.9 hotfix did not fix this issue.Additional Details
Steps to reproduce
/?t=coffee,food
asyncData
, extract thet
query string parameterWhat is Expected?
route.query.t == 'coffee,food'
What is actually happening?
route.query.t == 'coffee%2Cfood'
The text was updated successfully, but these errors were encountered: