Flash Script – Flash’s Escape and Unescape Functions

Tweet

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

Get your free chapter of Level Up Your Web Apps with Go

Get a free chapter of Level Up Your Web Apps with Go, plus updates and exclusive offers from SitePoint.

No Reader comments