Added encodeURIComponent to encode any user values being passed into the API module.