Handle URLs with spaces properly