Switch to CGI.escape to fix encoding issues with '[]'