#9580: javascript_quote should accept SafeUnicode
---------------------------------------------+------------------------------
          Reporter:  [email protected]     |         Owner:  keithb    
            Status:  closed                  |     Milestone:  1.1       
         Component:  Uncategorized           |       Version:  1.0-beta-1
        Resolution:  wontfix                 |      Keywords:            
             Stage:  Design decision needed  |     Has_patch:  0         
        Needs_docs:  0                       |   Needs_tests:  0         
Needs_better_patch:  0                       |  
---------------------------------------------+------------------------------
Changes (by keithb):

  * status:  assigned => closed
  * resolution:  => wontfix

Comment:

 Replying to [comment:5 Passy]:
 > I used it to escape a rendered form in an ajax response to load it
 afterwards into a wrapper element with javascript. I currently decode it
 as UTF-8, but I guess supporting a safe string would be more intuitive.

 Use `django.template.defaultfilters.escapejs` instead of
 `javascript_quote`. (You don't need to limit use of template filters to
 template rendering. Filters are just functions that operate on strings,
 and safe strings.)

 (resolution approved by Jacob)

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9580#comment:6>
Django <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to