Flash Lite 2.x and 3.0 ActionScript Language Reference

unescape function

unescape(x:String) : String

Evaluates the parameter x as a string, decodes the string from URL-encoded format (converting all hexadecimal sequences to ASCII characters), and returns the string.

Parameters

string:String - A string with hexadecimal sequences to escape.

Returns

String - A string decoded from a URL-encoded parameter.

Example

The following example shows the escape-to-unescape conversion process:


var email:String = "user@somedomain.com";
trace(email);
var escapedEmail:String = escape(email);
trace(escapedEmail);
var unescapedEmail:String = unescape(escapedEmail);
trace(unescapedEmail);

The following result is displayed in the Output panel.

user@somedomain.com
user%40somedomain%2Ecom
user@somedomain.com