I would like to do some sanitization of the request parameters.
I parse the request using CGI.parse , then I delete some parameters, but I cannot find the opposite method to build the request.
I really don't want to do something like
params.map{|n,v| "#{CGI.escape n}=#{CGI.escape v.to_s}"}.join("&")
There should be an easier way. There is?
ruby cgi
Leonid Shevtsov
source share