Closed lukeyeager closed 9 years ago
When you use a custom template, Autodoc uses render_template(). But the default template is rendered with render_template_string() (see here). Apparently, those functions handle autoescaping differently.
render_template()
render_template_string()
<p class="docstring">{{doc.docstring|urlize|nl2br}}</p>
Python2: Python3:
<p class="docstring">{% autoescape false %}{{doc.docstring|urlize|nl2br}}{% endautoescape %}</p>
Python2/3:
When you use a custom template, Autodoc uses
render_template()
. But the default template is rendered withrender_template_string()
(see here). Apparently, those functions handle autoescaping differently.Before
Python2: Python3:
After
Python2/3: