Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajax: add note on how to bypass query string alteration for JSON requests #878

Open
timmywil opened this issue Jan 25, 2016 · 0 comments
Open

Comments

@timmywil
Copy link
Member

See jquery/jquery#1799

JSON requests will sometimes get promoted to JSONP if deemed cross-browser (we already document that part). We add a callback name to the query string for JSONP requests (we document that too). The part that isn't documented is that in rare cases, the data for a json request contains a question mark, and so the callback name may be injected into a weird part of the string. Users can work around this by setting jsonp to false.

breville added a commit to code-dot-org/code-dot-org that referenced this issue May 9, 2016
When submitting a LevelGroup solution with "??" (no quotes) in a free response, it was being turned into a weird timestamp by Jquery.

By setting "jsonp: false" explicitly, we disable this behaviour.

References:
jquery/api.jquery.com#878
jquery/jquery#1799
https://bugs.jquery.com/ticket/8417
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant