Skip to content

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

Closed
@caub

Description

@caub
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    whatwg-urlIssues and PRs related to the WHATWG URL implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions