1
0
mirror of https://github.com/django/django.git synced 2025-07-20 01:29:11 +00:00

[1.9.x] Fixed #26206 -- Fixed docs comments causing empty code blocks.

Backport of f2b45ddd99ff23c0bd103f1dda1e1cb0c8dc6d84 from master
This commit is contained in:
Tim Graham 2016-02-11 07:58:15 -05:00
parent 670c816222
commit 9f743e25bd
2 changed files with 4 additions and 2 deletions

View File

@ -1248,7 +1248,6 @@ The view is hooked up to your application and configured in the same fashion as
The response format is as follows: The response format is as follows:
.. code-block:: text .. code-block:: text
.. JSON doesn't allow comments so highlighting as JSON won't work here.
{ {
"catalog": { "catalog": {
@ -1260,6 +1259,8 @@ The response format is as follows:
"plural": "..." # Expression for plural forms, or null. "plural": "..." # Expression for plural forms, or null.
} }
.. JSON doesn't allow comments so highlighting as JSON won't work here.
Note on performance Note on performance
------------------- -------------------

View File

@ -30,10 +30,11 @@ malicious input, it is not entirely foolproof. For example, it will not
protect the following: protect the following:
.. code-block:: text .. code-block:: text
.. highlighting as html+django fails due to intentionally missing quotes.
<style class={{ var }}>...</style> <style class={{ var }}>...</style>
.. highlighting as html+django fails due to intentionally missing quotes.
If ``var`` is set to ``'class1 onmouseover=javascript:func()'``, this can result If ``var`` is set to ``'class1 onmouseover=javascript:func()'``, this can result
in unauthorized JavaScript execution, depending on how the browser renders in unauthorized JavaScript execution, depending on how the browser renders
imperfect HTML. (Quoting the attribute value would fix this case.) imperfect HTML. (Quoting the attribute value would fix this case.)