From: Ben Darnell Date: Sat, 16 Apr 2011 20:23:39 +0000 (-0700) Subject: Make template constructor accept unicode strings X-Git-Tag: v2.0.0~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ae67873bc57be1ecea3de1b134cf2bd8fdbd467;p=thirdparty%2Ftornado.git Make template constructor accept unicode strings Closes #244 --- diff --git a/tornado/template.py b/tornado/template.py index 34dc0689e..ff8bbba98 100644 --- a/tornado/template.py +++ b/tornado/template.py @@ -101,7 +101,7 @@ class Template(object): 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: