Skip to content

Commit

Permalink
Make template constructor accept unicode strings
Browse files Browse the repository at this point in the history
Closes #244
  • Loading branch information
bdarnell committed Apr 16, 2011
1 parent 2afc7ba commit 3ae6787
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tornado/template.py
Expand Up @@ -101,7 +101,7 @@ def __init__(self, template_string, name="<string>", loader=None,
if compress_whitespace is None:
compress_whitespace = name.endswith(".html") or \
name.endswith(".js")
reader = _TemplateReader(name, template_string)
reader = _TemplateReader(name, escape.utf8(template_string))
self.file = _File(_parse(reader))
self.code = self._generate_python(loader, compress_whitespace)
try:
Expand Down

0 comments on commit 3ae6787

Please sign in to comment.