From 1f6bc7ffa774ee7f00ed58f62477be64c1e0451e Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 6 Jan 2008 03:53:04 +0000 Subject: [PATCH] The "first" filter can return an unsafe string for safe input ( {{"<"|first}} ), so change is_safe to False. Refs #5567. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6997 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/template/defaultfilters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py index 5cee0ab2445..7ef531e688e 100644 --- a/django/template/defaultfilters.py +++ b/django/template/defaultfilters.py @@ -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)``."""