On Wed, 2008-01-02 at 15:38 -0800, grahamu wrote:
[...]
> 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.

You might want to double-check that you're debugging the correct
problem. There is no code in Django that is adding the "pre" tags here.
The only occurrence of the string "<pre" in the source code is in a
docstring for the "debug" template tag. So working out at which step
that extra content is being added will no doubt help you zero in on the
problem code.

Regards,
Malcolm

-- 
Two wrongs are only the beginning. 
http://www.pointy-stick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
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