replace spaces in a string with /%20/
compress the string