From 9140c7b72b7a9b073fcf5f878af491d6d1000fbf Mon Sep 17 00:00:00 2001 From: Tom Gross Date: Fri, 28 Oct 2016 14:45:14 +0000 Subject: [PATCH] Explicitly set UTF-8 encoding in response --- CHANGES.rst | 3 ++- src/collective/handlebars/browser/views.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index e8b3623..9841a09 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,7 +5,8 @@ Changelog 1.2 (unreleased) ---------------- -- Nothing changed yet. +- Explicitly set UTF-8 encoding in response + [tomgross] 1.1 (2016-10-28) diff --git a/src/collective/handlebars/browser/views.py b/src/collective/handlebars/browser/views.py index 7f8c345..8932d5e 100644 --- a/src/collective/handlebars/browser/views.py +++ b/src/collective/handlebars/browser/views.py @@ -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)