Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #17110 -- Mentionned that the {% filter %} tag doesn't support …

…the 'safe' and 'escape' filters. Thanks benspaulding.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17271 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4c445fdfaa7c315ed2fcdcf4c00de2c3cdcfcbb6 1 parent d72c0bd
Aymeric Augustin authored December 24, 2011
4  django/template/defaulttags.py
@@ -617,6 +617,10 @@ def do_filter(parser, token):
617 617
         {% filter force_escape|lower %}
618 618
             This text will be HTML-escaped, and will appear in lowercase.
619 619
         {% endfilter %}
  620
+
  621
+    Note that the ``escape`` and ``safe`` filters are not acceptable arguments.
  622
+    Instead, use the ``autoescape`` tag to manage autoescaping for blocks of
  623
+    template code.
620 624
     """
621 625
     _, rest = token.contents.split(None, 1)
622 626
     filter_expr = parser.compile_filter("var|%s" % (rest))
6  docs/ref/templates/builtins.txt
@@ -237,6 +237,12 @@ Sample usage::
237 237
         This text will be HTML-escaped, and will appear in all lowercase.
238 238
     {% endfilter %}
239 239
 
  240
+.. note::
  241
+
  242
+    The :tfilter:`escape` and :tfilter:`safe` filters are not acceptable
  243
+    arguments. Instead, use the :ttag:`autoescape` tag to manage autoescaping
  244
+    for blocks of template code.
  245
+
240 246
 .. templatetag:: firstof
241 247
 
242 248
 firstof

0 notes on commit 4c445fd

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