From 73dd6f83f3882bd6efb1bb6116c0c0a37a541896 Mon Sep 17 00:00:00 2001 From: Adam Cooper Date: Thu, 12 Oct 2017 20:50:37 +0100 Subject: [PATCH 1/2] Added autoescape kwarg to Jinja environment --- homeassistant/components/frontend/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index 797a0f6b929fd..19823f68252d7 100755 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -327,9 +327,10 @@ def __init__(self): from jinja2 import FileSystemLoader, Environment self.templates = Environment( + autoescape=True, loader=FileSystemLoader( os.path.join(os.path.dirname(__file__), 'templates/') - ) + ), ) @asyncio.coroutine From 04379fa65d7421b4fba09e0372d5b23152ebec56 Mon Sep 17 00:00:00 2001 From: Adam Cooper Date: Thu, 12 Oct 2017 20:52:32 +0100 Subject: [PATCH 2/2] Removed extra comma --- homeassistant/components/frontend/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index 19823f68252d7..941de4574cffb 100755 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -330,7 +330,7 @@ def __init__(self): autoescape=True, loader=FileSystemLoader( os.path.join(os.path.dirname(__file__), 'templates/') - ), + ) ) @asyncio.coroutine