I know that escape
is deprecated, but what is the corresponding alternative that generates the same result?
In this case, I'm sending data to an API which expects that ä
turns in to %E4
, and not %C3%A4
.
console.log(escape('ä'), encodeURIComponent('ä')); //%E4, %C3%A4