#2657: [patch] Add carriage return quote in django.utils.text.javascript_quote
----------------------------+-----------------------------------------------
 Reporter:  Alex Dedul      |       Owner:  adrian
     Type:  defect          |      Status:  new   
 Priority:  normal          |   Milestone:        
Component:  Core framework  |     Version:        
 Severity:  normal          |    Keywords:        
----------------------------+-----------------------------------------------
 \r should be also quoted, at least firefox interprets it as a new line and
 this breaks javascript. Patch is trivial
 
 
 {{{
 Index: django/utils/text.py
 ===================================================================
 --- django/utils/text.py    (revision 3722)
 +++ django/utils/text.py    (working copy)
 @@ -104,6 +104,7 @@
      elif type(s) != unicode:
          raise TypeError, s
      s = s.replace('\\', '\\\\')
 +    s = s.replace('\r', '\\r')
      s = s.replace('\n', '\\n')
      s = s.replace('\t', '\\t')
      s = s.replace("'", "\\'")
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2657>
Django <http://code.djangoproject.org/>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to