Use CGI.escape instead of obsolete URI.escape