basho/riak-ruby-client — Issue #6: MapReduce URI-escapes buckets/keys
Author: seancribbs
Created: 2012-01-12 21:11:22+00:00
State: open
Labels: documentation

Moved from https://github.com/seancribbs/ripple/issues/235 by @outoftime:

I noticed that the MapReduce class calls `escape` all over the place when constructing itself, which is implemented as CGI#escape. However, the MapReduce phase executes by POSTing a JSON document to Riak, so I don't think it makes sense to URI-escape the values. After noticing this as a problem when constructing my own map/reduce with keys that contain URI-unsafe characters, I got it working easily enough by overriding MapReduce#escape to just return the value untouched.

I'm happy to submit a patch for this; just wanted to confirm that my instincts are correct first. Thanks!

## Copied Comments

#### @seancribbs on November 10, 2011

If you are using Riak 1.0 do `Riak.url_escaping = true` and this will not occur.