url encode/decode ids.

@otfrom - for review only -  this should handle the spaces in ids thing we talked about.