unescape() is not strictly deprecated
(as in "removed from the Web standards"), it is defined in
of the ECMA-262 standard, whose introduction states:
… All of the language features and behaviors specified in this annex have one or more undesirable characteristics and in the absence of legacy usage would be removed from this specification. … … Programmers should not use or assume the existence of these features and behaviors when writing new ECMAScript code. …
unescape() function computes a new string in which
hexadecimal escape sequences are replaced with the character that it represents. The
escape sequences might be introduced by a function like
decodeURIComponent are preferred over
Note: Do not use
unescape to decode URIs,
A string to be decoded.
A new string in which certain characters have been unescaped.
unescape function is a property of the global object.
unescape('abc123'); // "abc123" unescape('%E4%F6%FC'); // "äöü" unescape('%u0107'); // "ć"
|ECMAScript Language Specification |
BCD tables only load in the browser