Author: adrian
Date: 2006-04-23 17:23:46 -0500 (Sun, 23 Apr 2006)
New Revision: 2738

Modified:
   django/branches/magic-removal/django/utils/html.py
   django/branches/magic-removal/docs/templates.txt
Log:
magic-removal: Fixed #1270 -- Made the escape filter escape single quotes

Modified: django/branches/magic-removal/django/utils/html.py
===================================================================
--- django/branches/magic-removal/django/utils/html.py  2006-04-23 22:20:43 UTC 
(rev 2737)
+++ django/branches/magic-removal/django/utils/html.py  2006-04-23 22:23:46 UTC 
(rev 2738)
@@ -25,7 +25,7 @@
     "Returns the given HTML with ampersands, quotes and carets encoded"
     if not isinstance(html, basestring):
         html = str(html)
-    return html.replace('&', '&amp;').replace('<', '&lt;').replace('>', 
'&gt;').replace('"', '&quot;')
+    return html.replace('&', '&amp;').replace('<', '&lt;').replace('>', 
'&gt;').replace('"', '&quot;').replace("'", '&#39;')
 
 def linebreaks(value):
     "Converts newlines into <p> and <br />s"

Modified: django/branches/magic-removal/docs/templates.txt
===================================================================
--- django/branches/magic-removal/docs/templates.txt    2006-04-23 22:20:43 UTC 
(rev 2737)
+++ django/branches/magic-removal/docs/templates.txt    2006-04-23 22:23:46 UTC 
(rev 2738)
@@ -844,7 +844,8 @@
     * ``"&"`` to ``"&amp;"``
     * ``<`` to ``"&lt;"``
     * ``>`` to ``"&gt;"``
-    * ``'"'`` (double quote) to ``"&quot;"``
+    * ``'"'`` (double quote) to ``'&quot;'``
+    * ``"'"`` (single quote) to ``'&#39;'``
 
 filesizeformat
 ~~~~~~~~~~~~~~


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@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-updates
-~----------~----~----~----~------~----~------~--~---

Reply via email to