migrate to cgi::escape from url encode