mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #29791 -- Made Engine.render_to_string() honor autoescape.
This commit is contained in:
committed by
Tim Graham
parent
d4df5e1b0b
commit
624573726a
@@ -21,6 +21,13 @@ class RenderToStringTest(SimpleTestCase):
|
||||
'obj:test\n',
|
||||
)
|
||||
|
||||
def test_autoescape_off(self):
|
||||
engine = Engine(dirs=[TEMPLATE_DIR], autoescape=False)
|
||||
self.assertEqual(
|
||||
engine.render_to_string('test_context.html', {'obj': '<script>'}),
|
||||
'obj:<script>\n',
|
||||
)
|
||||
|
||||
|
||||
class GetDefaultTests(SimpleTestCase):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user