Hi,
I'm having a problem with Django "HTML escaping" JSON data sent in
response to an asynchronous form submission when the form has an
<input type="file" ...> field. Forms that don't have a file field
yield proper responses, and when Javascript is disabled on the browser
normal form submissions work as well.

I'm using the Yahoo User Interface library, specifically the Dialog &
Connection Manager components, to send and receive asynchronous
messages to/from my view.

As an example, the JSON response seen by the javascript might be:

   "<pre>{\"valid\": false, \"errors\": {\"options\": \"&lt;ul class=\
\"errorlist\\"&gt;&lt;li&gt;This field is required.&lt;\/li&gt;&lt;\/
ul&gt;\"}}</pre>"

when it should be:

   "{\"valid\": false, \"errors\": {\"options\": \"<ul class=\
\"errorlist\\"><li>This field is required.<\/li><\/ul>\"}}"

You can see that the Django system encapsulates the entire response in
<pre></pre> tags. Additionally, the underlying error message HTML is
also escaped.

Does anyone know why this escaping might be happening? Can you suggest
how I might avoid the escaping of the response?

Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to