unescape( ) Global Function | Flash 5 |
decode an escaped (URL-encoded) string |
A string (or an expression that resolves to a string) that was previously encoded via escape( ).
A new string that is a decoded version of string.
The unescape( ) function returns a new string based on string. The new string contains equivalent characters for every occurrence of hexadecimal escape sequences in string, as described under escape( ). The escape( ) and unescape( ) functions are used to encode and decode strings for safe transfer over a network. However, manual use of unescape( ) rarely is necessary, as Flash automatically unescapes URL-encoded text when it is imported via loadVariables( ) or the LoadVars class.
var msg = "hello!"; // Set msgCoded to "hello%21" msgCoded = escape(msg); // Set msgDecoded to "hello!" var msgDecoded = unescape(msgCoded);