alotaiba / FlyJSONP

FlyJSONP is a small JavaScript library, that allows you to do cross-domain GET and POST requests, with JSON response.
http://alotaiba.github.com/FlyJSONP
Other
161 stars 25 forks source link

Ampersand trouble #2

Open TheOddLinguist opened 12 years ago

TheOddLinguist commented 12 years ago

When I send a request (POST request for authentication, in this specific case) with an ampersand as part of one of the params, it disappears by the time it gets to my webapp. I'm guessing it's because there's a part of the process that mistakes it as an ampersand in a query string or something like that. Any idea how to get around this issue? Perhaps do some other encode/decode before calling FlyJSONP, like Base64, to avoid the characters? (Although that has equals signs; perhaps that'd be an issue, too?)

starpause commented 11 years ago

TheOddLinguist, I hope you've solved your problem by now but just in case & for anyone else running into similar: yes, your params are being sent to the server as part of a URL string so any reserved characters need to be encoded. Javascript's built in encodeURI will handle this nicely.