diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-01-06 03:53:04 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-01-06 03:53:04 +0000 |
| commit | 1f6bc7ffa774ee7f00ed58f62477be64c1e0451e (patch) | |
| tree | 897d32fe69d3e418ed5c42ba5f288700fada11d9 | |
| parent | 3d52ce730f72437645da3107fac8d29b3408ae61 (diff) | |
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
| -rw-r--r-- | django/template/defaultfilters.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py index 5cee0ab244..7ef531e688 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)``.""" |
