Flash Script – Flash’s Escape and Unescape Functions

By Georgina Laidlaw
We teamed up with SiteGround
To bring you the latest from the web and tried-and-true hosting, recommended for designers and developers. SitePoint Readers Get Up To 65% OFF 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
We teamed up with SiteGround
To bring you the latest from the web and tried-and-true hosting, recommended for designers and developers. SitePoint Readers Get Up To 65% OFF Now