#20701: Using python dicts directly in javascript
----------------------------------+--------------------------------------
     Reporter:  tim0306+django@…  |                    Owner:  nobody
         Type:  New feature       |                   Status:  closed
    Component:  Uncategorized     |                  Version:  1.5
     Severity:  Normal            |               Resolution:  duplicate
     Keywords:                    |             Triage Stage:  Unreviewed
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+--------------------------------------
Changes (by aaugustin):

 * status:  new => closed
 * needs_better_patch:   => 0
 * resolution:   => duplicate
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 This is a duplicate of #17419 which cannot be implemented without
 introducing major security problems (XSS). It's impossible to serialize an
 arbitrary data structure into JavaScript embedded in HTML with Python's
 `json` module with adequate escaping. Trust me, I tried hard.

 Request the JSON blob with AJAX instead.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20701#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/082.604b4a098c5ee51890d22c6dfa19745f%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to