diff options
Diffstat (limited to 'server.py')
-rw-r--r-- | server.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -119,8 +119,8 @@ def render_file(path): ) if os.path.isfile(abs_path): if abs_path.endswith('.html'): - with open(abs_path) as f: - content = f.read() + with open(abs_path, 'rb') as f: + content = f.read().decode("UTF-8") return render_template_string(CONTENT_BLOCK.replace('$', content), **context) elif abs_path.endswith('.html!'): return render_template("site/" + path, **context) |