Flash Script – Flash’s Escape and Unescape Functions

We teamed up with SiteGround
To bring you up to 65% off web hosting, plus free access to the entire SitePoint Premium library (worth $99). Get SiteGround + SitePoint Premium Now

The function escape("argument") converts the argument to a string and encodes it in a URL-encoded format.

Here, all alphanumeric characters are escaped with % hexadecimal sequences. For example,

escape("escape unescape");

gives as its output:

escape%20unescape

where %20 is space.

The function unescape converts all hexadecimal sequences to ASCII characters. For example,

unescape("escape%20unescape");

produces as its output:

escape unescape