Skip to content

Commit

Permalink
extensions: ensure included file are decoded as UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentbernat committed Mar 22, 2020
1 parent b6905e4 commit 6baa46a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/jinja.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ def same_tag(resource, attribute, skip=0):
def include_file(ctx, name):
target = os.path.join(str(ctx.parent['node']), name)
with open(target, "r") as f:
return jinja2.Markup(f.read())
return jinja2.Markup(f.read().decode('utf8'))

0 comments on commit 6baa46a

Please sign in to comment.