I had looked at URI.encode_www_form() but judging by the examples, it wouldnt handle the remove[] properly.  Instead just resulting in remove=k1&remove=k2 which sinatra would interpret as params['remove'] == 'k2' and not as params['remove'] == ['k1', 'k2']