summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/template/defaultfilters.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py
index 5289ef34a0..589ca38414 100644
--- a/django/template/defaultfilters.py
+++ b/django/template/defaultfilters.py
@@ -445,6 +445,16 @@ def escape_filter(value):
@register.filter(is_safe=True)
+def escapeseq(value):
+ """
+ An "escape" filter for sequences. Mark each element in the sequence,
+ individually, as a string that should be auto-escaped. Return a list with
+ the results.
+ """
+ return [conditional_escape(obj) for obj in value]
+
+
+@register.filter(is_safe=True)
@stringfilter
def force_escape(value):
"""