js-unescape. Decoding similar to unescape function in JavaScript   [3.3.0]

^string:js-unescape[escaped]

Note: this is method, not a constructor!

Unescapes a string. This method does the transformation similar to
unescape function described in ECMA-262.
Using this method you can decode strings which were escaped in browser by JavaScript function escape.

To escape a string use
^string.js-escape[]

Detailed information on ECMA-262 is available here:
http://www.ecma-international.org/publications/standards/Ecma-262.htm
(B.2.2)

Note: this method also decodes symbols which were encoded as \uXXXX
   [3.4.1]

Example
$escaped[abcd%20%60+-%3D%7E%21@%23%25%26*%28%29_%20%5B%5D%7B%7D%3C%3E%3A%27%22%2C./%3F%u0430%u0431%u0432%u0433%u0434]
$original[^string:js-unescape[$escaped]]
$original

Outputs
abcd `+-=~!@#%&*()_ []{}<>:'",./?



Copyright © 1997–2017 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 24.04.2016