3

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
Johan
  • 35,120
  • 54
  • 178
  • 293

0 Answers0