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

Fix double decoding URIError when using input resolvers #118

Merged
merged 2 commits into from
Nov 1, 2023

Conversation

diogob
Copy link
Contributor

@diogob diogob commented Nov 1, 2023

We had an unnecessary decodeURIComponent for values passed in forms or search parameters.
The error was introduced during our qs replacement in v2.0.0
This PR should take care of #117

@diogob diogob marked this pull request as ready for review November 1, 2023 02:11
@@ -247,7 +256,7 @@ describe('inputFromSearch', () => {
it('takes keys encoded as URI components', () => {
const qs = new URLSearchParams()
qs.append('some%20colors[0]', 'blue')
qs.append('some%20colors[1]', 'red%20ish')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test case was bogus since URLSearchParams will encode values and keys for us.

Copy link
Collaborator

@gustavoguichard gustavoguichard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@diogob diogob changed the title Fix double URIError when using input resolvers Fix double decoding URIError when using input resolvers Nov 1, 2023
@gustavoguichard gustavoguichard merged commit 1bce41a into main Nov 1, 2023
2 checks passed
@gustavoguichard gustavoguichard deleted the fix-double-decoding branch November 1, 2023 02:55
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.

2 participants