From 45d79a543152a5893c22ce1ef4efb662b05666b2 Mon Sep 17 00:00:00 2001 From: Maxime Courtet Date: Tue, 24 Sep 2019 17:46:13 +0200 Subject: [PATCH 1/2] Fix travis conf. --- .travis.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 13d217e..682aaa1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,11 +18,12 @@ env: - DJANGO_VERSION=3.0a1 - DJANGO_VERSION=dev -allow_failures: - - python: 3.6 - env: DJANGO_VERSION=dev - - python: 3.7 - env: DJANGO_VERSION=dev +matrix: + allow_failures: + - python: 3.6 + env: DJANGO_VERSION=dev + - python: 3.7 + env: DJANGO_VERSION=dev install: - python setup.py install From bffdb95db8cf1b75aadca842a244c1a634b47127 Mon Sep 17 00:00:00 2001 From: Maxime Courtet Date: Tue, 24 Sep 2019 17:47:32 +0200 Subject: [PATCH 2/2] Clean tags before filling the template. --- template_engines/backends/abstract.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/template_engines/backends/abstract.py b/template_engines/backends/abstract.py index 3e9a692..86195f2 100644 --- a/template_engines/backends/abstract.py +++ b/template_engines/backends/abstract.py @@ -8,6 +8,8 @@ from django.template.loader import TemplateDoesNotExist from django.utils.functional import cached_property +from .utils import clean_tags + class AbstractTemplate: """ @@ -91,5 +93,5 @@ def get_template_path(self, filename): def get_template(self, template_name): template_path = self.get_template_path(template_name) - content = self.get_template_content(template_path) + content = clean_tags(self.get_template_content(template_path)) return self.from_string(content, template_path=template_path)