Closed
Description
Version
19.7.0
Platform
all
Subsystem
No response
What steps will reproduce the bug?
When parsing a url containing double quotes with new URL()
, the quotes are not percent encoded.
Test code:
const { href } = new URL('https://example.com/"quoted"');
console.log(href);
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
Expected:
const { href } = new URL('https://example.com/"quoted"');
console.log(href);
// => https://example.com/%22quoted%22
What do you see instead?
Actual:
const { href } = new URL('https://example.com/"quoted"');
console.log(href);
// => https://example.com/"quoted"
Additional information
Last good: Node.js v19.6.1
First bad: Node.js v19.7.0
Seem to be regressed by #46410