fixed input to url encode/decode functions