Added code which replaces space in a string with %20