use the encodeURI() function to encode the url string