summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-11-14 21:07:27 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-11-14 21:07:27 +0000
commitbdb0b903c2885a3f4b7f0282b8ba04267a1fc29e (patch)
tree2550448f28ae978546ca151a2053841665c91f3f /docs
parent356662cf74c99fac90afb0f5e6aac8d2d573e62a (diff)
Content coming via {{ block.super }} is always going to be correctly escaped
already. We mark it as safe so that template authors don't need to. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6673 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/templates.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/templates.txt b/docs/templates.txt
index b85f108bbe..020586159c 100644
--- a/docs/templates.txt
+++ b/docs/templates.txt
@@ -280,7 +280,9 @@ Here are some tips for working with inheritance:
* If you need to get the content of the block from the parent template,
the ``{{ block.super }}`` variable will do the trick. This is useful
if you want to add to the contents of a parent block instead of
- completely overriding it.
+ completely overriding it. Data inserted using ``{{ block.super }}`` will
+ not be automatically escaped (see the `next section`_), since it was
+ already escaped, if necessary, in the parent template.
* For extra readability, you can optionally give a *name* to your
``{% endblock %}`` tag. For example::
@@ -299,6 +301,8 @@ it also defines the content that fills the hole in the *parent*. If there were
two similarly-named ``{% block %}`` tags in a template, that template's parent
wouldn't know which one of the blocks' content to use.
+.. _next section: #automatic-html-escaping
+
Automatic HTML escaping
=======================