Django

Code

Changeset 2738

Show
Ignore:
Timestamp:
04/23/06 17:23:46 (3 years ago)
Author:
adrian
Message:

magic-removal: Fixed #1270 -- Made the escape filter escape single quotes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/magic-removal/django/utils/html.py

    r2060 r2738  
    2626    if not isinstance(html, basestring): 
    2727        html = str(html) 
    28     return html.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('"', '&quot;') 
     28    return html.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('"', '&quot;').replace("'", '&#39;') 
    2929 
    3030def linebreaks(value): 
  • django/branches/magic-removal/docs/templates.txt

    r2700 r2738  
    845845    * ``<`` to ``"&lt;"`` 
    846846    * ``>`` to ``"&gt;"`` 
    847     * ``'"'`` (double quote) to ``"&quot;"`` 
     847    * ``'"'`` (double quote) to ``'&quot;'`` 
     848    * ``"'"`` (single quote) to ``'&#39;'`` 
    848849 
    849850filesizeformat