Skip to content

querystring.parse expands "+" always, regardless of the parser #21841

Closed
@koblas

Description

@koblas
  • 8.11.3:
  • MacOS 10.13.5:
  • querystring:

The "+" is always decoded in a query string, you can note the behavior difference in the example below. Using the internal parser an "external" parser and the parser directly yield results that are different.

> querystring.parse('email=test+recipient')
{ email: 'test recipient' }
> querystring.parse('email=test+recipient', undefined, undefined, { decodeURIComponent: decodeURIComponent })
{ email: 'test recipient' }
> decodeURIComponent('test+recipient')
'test+recipient'

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedIssues that need assistance from volunteers or PRs that need help to proceed.querystringIssues and PRs related to the built-in querystring module.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions