Name
unescape( ) Global Function — decode an escaped string
Availability
Flash 5
Synopsis
unescape(stringExpression)
Arguments
- stringExpression
A string (or expression that resolves to a string) that was previously encoded via
escape( ).
Returns
A new string that is a decoded version of
string.
Description
The unescape( ) function returns a new string
based on string. The new string contains
equivalent Latin 1 characters for every occurrence of a two-digit
hexadecimal escape sequence prefixed with % in
string. The escape( )
and unescape( ) functions are used to encode and
decode strings for safe transfer over a network. However, manual use
of unescape( ) is rarely necessary as Flash
automatically converts URL-encoded text when it is imported via
loadVariables( ).
Example
var msg = "hello!"; // Set msgCoded to "hello%21" msgCoded = escape(msg); // Set msgDecoded to "hello!" var msgDecoded = unescape(msgCoded);
See Also
escape( ); Appendix B
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access