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

URLSearchParams behavior doesn't match browsers #7308

Closed
ghost opened this issue Sep 1, 2020 · 3 comments · Fixed by #7314
Closed

URLSearchParams behavior doesn't match browsers #7308

ghost opened this issue Sep 1, 2020 · 3 comments · Fixed by #7314
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@ghost
Copy link

ghost commented Sep 1, 2020

deno:

new URLSearchParams('q=a+b').get('q') // => "a+b"
new URLSearchParams('q=a+b').toString() // => "q=a%2Bb"

node, browsers (safari, chrome, firefox):

new URLSearchParams('q=a+b').get('q') // => "a b"
new URLSearchParams('q=a+b').toString() // => "q=a+b"
@ry ry added bug Something isn't working good first issue Good for newcomers labels Sep 1, 2020
@bartlomieju
Copy link
Member

Just tried on 1.3.2 both example give expected results.

@lucacasonato
Copy link
Member

Just tried on 1.3.2 both example give expected results.

Really? I can reproduce the issue:

~ ❯❯❯ deno
Deno 1.3.2
exit using ctrl+d or close()
> new URLSearchParams('q=a+b').get('q')
a+b
> new URLSearchParams('q=a+b').toString()
q=a%2Bb
> 

I actually encountered this in deno_registry2 a week ago: denoland/deno_registry2#88

@ry ry closed this as completed Sep 1, 2020
@ry ry reopened this Sep 1, 2020
@bartlomieju
Copy link
Member

My bad, I misread which one is expected and which is not. CC @nayeemrmn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants