utf8 content.json fix, faster node.js coffeescript compiler support

This commit is contained in:
HelloZeroNet 2015-01-26 01:43:39 +01:00
parent 1468756691
commit 6cedaa8e8f
2 changed files with 8 additions and 9 deletions

View file

@ -84,9 +84,8 @@ class UiRequest:
def render(self, template_path, *args, **kwargs):
#template = SimpleTemplate(open(template_path), lookup=[os.path.dirname(template_path)])
#yield str(template.render(*args, **kwargs).encode("utf8"))
ENCODING = 'utf-8'
template = unicode(open(template_path).read(), ENCODING)
yield template.format(**kwargs).encode(ENCODING)
template = open(template_path).read().decode("utf8")
yield template.format(**kwargs).encode("utf8")
# - Actions -