parent
9ebfc39754
commit
fc77d7fe13
|
@ -271,7 +271,7 @@ class Template(object):
|
|||
.. versionchanged:: 4.3
|
||||
Added ``whitespace`` parameter; deprecated ``compress_whitespace``.
|
||||
"""
|
||||
self.name = name
|
||||
self.name = escape.native_str(name)
|
||||
|
||||
if compress_whitespace is not _UNSET:
|
||||
# Convert deprecated compress_whitespace (bool) to whitespace (str).
|
||||
|
|
|
@ -173,6 +173,10 @@ try{% set y = 1/x %}
|
|||
template = Template('{{ 1 / 2 }}')
|
||||
self.assertEqual(template.generate(), '0')
|
||||
|
||||
def test_non_ascii_name(self):
|
||||
loader = DictLoader({u("t\u00e9st.html"): "hello"})
|
||||
self.assertEqual(loader.load(u("t\u00e9st.html")).generate(), b"hello")
|
||||
|
||||
|
||||
class StackTraceTest(unittest.TestCase):
|
||||
def test_error_line_number_expression(self):
|
||||
|
|
Loading…
Reference in New Issue