summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBaptiste Mispelon <bmispelon@gmail.com>2013-06-25 20:28:35 +0200
committerBaptiste Mispelon <bmispelon@gmail.com>2013-06-25 20:28:35 +0200
commitec371ace004203100d24a74edafc16534dd5d5a9 (patch)
treef829d64fea7096f8648e682d9ab9b68b1e4ab67f /tests
parentb91787910c9d5a036674d46a73d1b48ca33123a3 (diff)
Fixed #20650 -- Fixed {% filter %} incorrectly accepting 'escape' as argument
Thanks to grzesiof for the report and to loic84 and Alex Gaynor for the review.
Diffstat (limited to 'tests')
-rw-r--r--tests/template_tests/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/template_tests/tests.py b/tests/template_tests/tests.py
index 206c648398..76712a09a6 100644
--- a/tests/template_tests/tests.py
+++ b/tests/template_tests/tests.py
@@ -854,6 +854,10 @@ class TemplateTests(TransRealMixin, TestCase):
'filter02': ('{% filter upper %}django{% endfilter %}', {}, 'DJANGO'),
'filter03': ('{% filter upper|lower %}django{% endfilter %}', {}, 'django'),
'filter04': ('{% filter cut:remove %}djangospam{% endfilter %}', {'remove': 'spam'}, 'django'),
+ 'filter05': ('{% filter safe %}fail{% endfilter %}', {}, template.TemplateSyntaxError),
+ 'filter05bis': ('{% filter upper|safe %}fail{% endfilter %}', {}, template.TemplateSyntaxError),
+ 'filter06': ('{% filter escape %}fail{% endfilter %}', {}, template.TemplateSyntaxError),
+ 'filter06bis': ('{% filter upper|escape %}fail{% endfilter %}', {}, template.TemplateSyntaxError),
### FIRSTOF TAG ###########################################################
'firstof01': ('{% firstof a b c %}', {'a':0,'b':0,'c':0}, ''),