in reply to Unescaping function

Are you trying to parse the query string? You shouldn't - see use CGI or die; as well as Ovid's excellent CGI course.

Makeshifts last the longest.