Sinatra + Backbone.js website for decoding and encoding URLs