summaryrefslogtreecommitdiff
path: root/docs/topics/security.txt
diff options
context:
space:
mode:
authorCarl Meyer <carl@oddbird.net>2014-09-26 11:06:49 -0600
committerCarl Meyer <carl@oddbird.net>2014-09-26 11:07:55 -0600
commitd16bc7f0e46785bcf422310c41d20b25c0112051 (patch)
treeaa8a07ef0c39b49861960ad04a6e6c1334c4c5b8 /docs/topics/security.txt
parentef5f9b6ae8c873927aa6047f5f9d1d902a0c2177 (diff)
Fixed #23561 -- Corrected a security doc example that requires an unquoted HTML attribute.
Thanks "djbug" for the report.
Diffstat (limited to 'docs/topics/security.txt')
-rw-r--r--docs/topics/security.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/topics/security.txt b/docs/topics/security.txt
index a3e656557b..6eab39efed 100644
--- a/docs/topics/security.txt
+++ b/docs/topics/security.txt
@@ -31,11 +31,11 @@ protect the following:
.. code-block:: html+django
- <style class="{{ var }}">...</style>
+ <style class={{ var }}>...</style>
If ``var`` is set to ``'class1 onmouseover=javascript:func()'``, this can result
in unauthorized JavaScript execution, depending on how the browser renders
-imperfect HTML.
+imperfect HTML. (Quoting the attribute value would fix this case.)
It is also important to be particularly careful when using ``is_safe`` with
custom template tags, the :tfilter:`safe` template tag, :mod:`mark_safe