escape()is not strictly deprecated (as in "removed from the Web standards"), it is defined in Annex B of the ECMA-262 standard, whose introduction states:
… All of the language features and behaviours 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 behaviours when writing new ECMAScript code. …
function computes a new string in which certain characters have been replaced by a hexadecimal escape sequence.
This function was used mostly for URL queries (the part of a URL following
for escaping ordinary String literals, which use the format "
are two hexadecimal digits, and the form
is used for higher-plane Unicode characters.)
Escaped characters in String literals can be expanded by replacing the
, then using the
A new string in which certain characters have been escaped.
function is a property of the
. Special characters are encoded with the exception of:
The hexadecimal form for characters, whose code unit value is
or less, is a two-digit escape sequence:
. For characters with a greater code unit, the four-digit format
escape('abc123'); // "abc123" escape('äöü'); // "%E4%F6%FC" escape('ć'); // "%u0107" // special characters escape('@*_+-./'); // "@*_+-./"
The definition of 'escape' in that specification.
||Chrome 1||Edge 12||Firefox 1||IE 3||Opera 3||Safari 1||WebView Android 1||Chrome Android 18||Firefox Android 4||Opera Android 10.1||Safari iOS 1||Samsung Internet Android 1.0||nodejs 0.1.100|