Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

does anyone have experienced cross browser issues with "encodeURIComponent(string)"

I need to make URL from some custom string values dynamically. I have doubt on "encodeURIComponent(string)" function whether it has cross browser issues does anyone experienced trouble with this function(I am not using any JS libraries)?

like image 846
DSharper Avatar asked Dec 10 '10 09:12

DSharper


1 Answers

encodeURIComponent works as advertised in a cross-browser fashion. Use it in preference to escape.

like image 91
Eamon Nerbonne Avatar answered Sep 19 '22 03:09

Eamon Nerbonne