Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean tags before filling the template. #30

Merged
merged 2 commits into from
Sep 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion template_engines/backends/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from django.template.loader import TemplateDoesNotExist
from django.utils.functional import cached_property

from .utils import clean_tags


class AbstractTemplate:
"""
Expand Down Expand Up @@ -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)