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开发者_StackOverflow issues does anyone experienced trouble with this function(I am not using any JS libraries)?
encodeURIComponent
works as advertised in a cross-browser fashion. Use it in preference to escape
.
Go for it. This is exactly what encodeURIComponent
is for and it's well-supported across browsers. I've never heard of a serious issue with it on any major implementation.
精彩评论