Skip to content

querystring.unescape does not correctly unescape percent characters #35012

Closed
@watilde

Description

@watilde
  • Version: v12, master
  • Platform: Windows, macOS
  • Subsystem: querystring

What steps will reproduce the bug?

const querystring = require('querystring');
console.log( 'expected: %*', `actual: ${querystring.unescape('%%2f')}`);
// => actual: %%2f
console.log( 'expected: %2*f*', `actual: ${querystring.unescape('%2%2af%2a')}`);
// => actual %2%2af*

What is the expected behavior?

It should unescape %2a to *.

What do you see instead?

Capture

Metadata

Metadata

Assignees

No one assigned

    Labels

    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