Removed some unnecessary conversion and allow the empty spaces in the url