Skip to content

Commit

Permalink
Explicitly set UTF-8 encoding in response
Browse files Browse the repository at this point in the history
  • Loading branch information
tomgross committed Oct 28, 2016
1 parent c53e19e commit 9140c7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Changelog
1.2 (unreleased)
----------------

- Nothing changed yet.
- Explicitly set UTF-8 encoding in response
[tomgross]


1.1 (2016-10-28)
Expand Down
2 changes: 2 additions & 0 deletions src/collective/handlebars/browser/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ def hbs_snippet(self, filename=None, _prefix=None):
partials = self.get_partials(hbs_dir)
helpers = self.get_helpers()

self.request.response.setHeader("Content-type",
"text/html; charset=utf-8")
return hbs_template(self.get_contents(),
helpers=helpers,
partials=partials)
Expand Down

0 comments on commit 9140c7b

Please sign in to comment.