And which one should I use?
+3
A:
URI.escape takes a second parameter that lets you mark what's unsafe. See APIDock:
rspeicher
2010-05-13 02:49:41
+1
A:
There were some small differences, but the important point is that URI.escape
has been deprecated in Ruby 1.9.2... so use CGI::escape
! :-)
There is a long discussion on ruby-core for those interested.
Marc-André Lafortune
2010-05-14 05:27:34