$cgi = new CGI; #your basic info from QUERY_STRING or STDIN $other_cgi = new CGI($query_string); # $query_string is the url info to escape