Fix encoding error in encodeUriComponent