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

new URLSearchParams([[key1, val1], [key2, val2]]) is not working #12778

Closed
caub opened this issue May 1, 2017 · 1 comment
Closed

new URLSearchParams([[key1, val1], [key2, val2]]) is not working #12778

caub opened this issue May 1, 2017 · 1 comment
Labels
whatwg-url Issues and PRs related to the WHATWG URL implementation.

Comments

@caub
Copy link

caub commented May 1, 2017

new url.URLSearchParams([['param1', 'val1'], ['...', '...']])+'';

This should output "param1=val1&...=..."

But it outputs 'param1%2Cval1%2C...%2C...='

The spec describes it here https://url.spec.whatwg.org/#urlsearchparams, the constructor should accept either a query-string, array of [key, value]'s or plain-object

Node version tested 7.9.0

@vsemozhetbyt vsemozhetbyt added the url Issues and PRs related to the legacy built-in url module. label May 1, 2017
@mscdex mscdex added whatwg-url Issues and PRs related to the WHATWG URL implementation. and removed url Issues and PRs related to the legacy built-in url module. labels May 1, 2017
@TimothyGu
Copy link
Member

TimothyGu commented May 2, 2017

This issue can be considered to be a duplicate of #10635. Node.js master branch has supported this feature since Jan 31 (#11060), and v7.10.0 will be released with that commit (backport PR #12507). The feature was held back from landing in any v7.x releases because of potential future changes in the constructor (whatwg/url#204), but as that cause was stalled I have landed it in v7.x just recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
whatwg-url Issues and PRs related to the WHATWG URL implementation.
Projects
None yet
Development

No branches or pull requests

4 participants