taf2/curb — pull request #189 by mrazicz (2014-02-15 07:53:20+00:00)
Title: [FIX] Curl#urlalize - CGI.escape for param values

- URI.escape does not escapes characters '&' and '?'. When in parameter
value is one of this characters, things goes seriously wrong.
For example:
```ruby
urlalize('http://foo.bar', a: 'b&c?d=1')
=> "http://foo.bar?a=b&c?d=1"
```
As you can see, this is definitely wrong url.
But it is even worse. When I escape my value with CGI.escape,
URI.escape in urlalize escapes all '%'. So again, wrong :(
Example:
```ruby
urlalize('http://foo.bar', a: CGI.escape('b&c'))
=> 'http://foo.bar?a=b%2526c'
```
I don't see any way how to send '&' or '?' to server. In first case,
parameter value with '&' or '?' is separated into more values, in
second case, for '&' will be send '%2526' which server represents as
'%26' instead of '&'.

- solution: use CGI.escape for values instead of URI.escape