Add escape characters to uri to handle spaces