jQuery Forms plugin and HTML-encoding of responses
Hello all,
I am using the jQuery Forms plugin on a form with file uploads (mainly testing in Firefox 3.5.8). If I understand correctly, this causes the form to submit to a hidden iframe, and the Forms plugin gives me the results from the iframe.
The issue I am having is that I cannot seem to control whether the server's response (a JSON object) is HTML-encoded or not (i.e. & is turned into & - and I think I have also seen that ' ends up coming back to me as a single quote). From what I can tell by debugging the code path and looking in Firebug, the reason seems to be the fact that the form is being retargeted to an iframe.
I've tried several different MIME types, including application/json, text/html, and text/plain. But it didn't seem to make any difference. In fact, when I use application/json, I get prompted to download the server response, which is definitely not what I want!
Has anyone encountered something similar?