[quote="Myhand":31wco2xd]I see that %(#8000BF)[escape()] and %(#8000BF)[unescape()] are deprecated (in Javascript,) though, and that you are recommending to use [them]
***%(#BF4000)[
@unknownuser said:
]***
@unknownuser said:
](http://msdn.microsoft.com/en-us/library/dz4x90hk(v)":31wco2xd]The unescape function should not be used to decode Uniform Resource Identifiers (URI). Use decodeURI and decodeURIComponent functions instead.
%(#8000BF)[decodeURI()]
%(#8000BF)[decodeURIComponent()]
Which do you recommend or should I continue with %(#8000BF)[unescape()]?
The old functions are ASCII, the new ones are Unicode.
Taking a look at the most recent released ECMA-262 (but not the latest proposed revision,) the old functions are no longer listed.
see: ECMA-262, 5.1, Global Object: 15.1.3 URI Handling Function Properties
ECMAScript Language Specification
Standard ECMA-262
5.1 Edition / June 2011
Link to the downloadable PDF of the specification.
But you need to handle the situation where an older browser does not have these functions so, write a wrapper in JS:
var unesc = function(uri) {
var test = false;
if (typeof(decodeURI) == "function") test = true;
return test ? decodeURI(uri) ; unescape(uri);
}
π