Version
v22.15.1
Platform
Linux localhost.localdomain 6.17.6-1-default #1 SMP PREEMPT_DYNAMIC Wed Oct 29 17:21:06 UTC 2025 (9e452b6) x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
Just write:
node -e "console.log(encodeURIComponent('price$100'))"
and output will be:
instead of:
as it works in browser (any chromeish and code in MDN)
It works strangely when $ sing in encoded string. Sometimes like abowe it cuts aftercharacter with it, sometimes it cuts all string as for example in:
node -e "console.log(encodeURIComponent('$a100'))"
it prints nothing.
encodeURI() function behaves same.
May be here is some nodejs specifics about this function?
How often does it reproduce? Is there a required condition?
always
What is the expected behavior? Why is that the expected behavior?
'$' sign converts to '%24'
What do you see instead?
nothing (empty string)
Additional information
Wrote in "steps to reproduce section".
Found only #33799 issue where stated that encodeURIComponent in nodejs works as in ecmascript standart.
Version
v22.15.1
Platform
Subsystem
No response
What steps will reproduce the bug?
Just write:
and output will be:
instead of:
as it works in browser (any chromeish and code in MDN)
It works strangely when $ sing in encoded string. Sometimes like abowe it cuts aftercharacter with it, sometimes it cuts all string as for example in:
it prints nothing.
encodeURI() function behaves same.
May be here is some nodejs specifics about this function?
How often does it reproduce? Is there a required condition?
always
What is the expected behavior? Why is that the expected behavior?
'$' sign converts to '%24'
What do you see instead?
nothing (empty string)
Additional information
Wrote in "steps to reproduce section".
Found only #33799 issue where stated that encodeURIComponent in nodejs works as in ecmascript standart.