change URI.escape to CGI.escape