summaryrefslogtreecommitdiff
path: root/django/template/engine.py
diff options
context:
space:
mode:
authorNathan Gaberel <nathan@gnab.fr>2019-03-23 20:27:45 +0000
committerTim Graham <timograham@gmail.com>2019-03-25 17:59:07 -0400
commit624573726aa5982d1c73aac85fb27aea3b3b23b7 (patch)
treea6e7c840eca8cf5335c296228888535461fe6984 /django/template/engine.py
parentd4df5e1b0b1c643fe0fc521add0236764ec8e92a (diff)
Fixed #29791 -- Made Engine.render_to_string() honor autoescape.
Diffstat (limited to 'django/template/engine.py')
-rw-r--r--django/template/engine.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/template/engine.py b/django/template/engine.py
index dfaa67ba12..ff9ce58d59 100644
--- a/django/template/engine.py
+++ b/django/template/engine.py
@@ -160,7 +160,7 @@ class Engine:
if isinstance(context, Context):
return t.render(context)
else:
- return t.render(Context(context))
+ return t.render(Context(context, autoescape=self.autoescape))
def select_template(self, template_name_list):
"""