9. curl::unescape

[<<<] [>>>]

This function will convert the given URL encoded input string to a "plain string" and return that string. All input characters that are encoded %XX where XX is a to digit hexadecimal character will be converted to their plain text version. All + characters that are after the (or a) ? character are converted to space.

Usage:

URLencoded = curl::escape(URLnonencoded)

This behaviour of this function makes it easy to unescape URLs that contain not only the CGI GET parameter of the URL, but the whole URL. For exaple:

print curl::unescape("http://www.kuka+muka.com/mypage.asp?name=Linus+Nielsen")

will print

http://www.kuka+muka.com/mypage.asp?name=Linus Nielsen

which is much better than having the web server name converted to something containing a space.


[<<<] [>>>]