Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.1.X] Fixed #6752 -- Corrected the interaction of the safe template…

… filter with other filters. Thanks to Rupe and Alex Gaynor for their work on the patch.

Backport of r13171 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@13177 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit c772e39d3467b31843270b8703958043dce0562f 1 parent 2ee73c2
Russell Keith-Magee authored May 09, 2010

Showing 1 changed file with 10 additions and 0 deletions. Show diff stats Hide diff stats

  1. 10  docs/ref/templates/builtins.txt
10  docs/ref/templates/builtins.txt
@@ -1477,6 +1477,16 @@ safe
1477 1477
 Marks a string as not requiring further HTML escaping prior to output. When
1478 1478
 autoescaping is off, this filter has no effect.
1479 1479
 
  1480
+.. note::
  1481
+
  1482
+    If you are chaining filters, a filter applied after ``safe`` can
  1483
+    make the contents unsafe again. For example, the following code
  1484
+    prints the variable as is, unescaped:
  1485
+
  1486
+    .. code-block:: html+django
  1487
+
  1488
+        {{ var|safe|escape }}
  1489
+
1480 1490
 .. templatefilter:: safeseq
1481 1491
 
1482 1492
 safeseq

0 notes on commit c772e39

Please sign in to comment.
Something went wrong with that request. Please try again.