Skip to content
Browse files

The "first" filter can return an unsafe string for safe input ( {{"&l…

…t;"|first}} ), so change is_safe to False. Refs #5567.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 3d52ce7 commit 1f6bc7ffa774ee7f00ed58f62477be64c1e0451e @malcolmt malcolmt committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/template/
2 django/template/
@@ -433,7 +433,7 @@ def first(value):
return value[0]
except IndexError:
return u''
-first.is_safe = True
+first.is_safe = False
def join(value, arg):
"""Joins a list with a string, like Python's ``str.join(list)``."""

0 comments on commit 1f6bc7f

Please sign in to comment.
Something went wrong with that request. Please try again.