O'Reilly logo

Learning WML, and WMLScript by Martin Frost

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

unescapeString — Undo URL escaping on a string

Usage

URL.unescape (str)

str : String

Description

Returns a new string in which all escape sequences in str of the form % hh (where hh is two hex digits) have been replaced with the ASCII character with hex code hh.

Returns invalid if str can’t be converted to a string, if it contains characters from outside the US-ASCII character set, or if any of the escape sequences have hex values greater than %7F.

Example

URL.unescapeString("%2Ffoo.cgi%3Ffoo%3D1%26bar%3D2")

returns string "/foo.cgi?foo=1&bar=2"

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required