Commit 1f6bc7ff authored by Malcolm Tredinnick's avatar Malcolm Tredinnick
Browse files

The "first" filter can return an unsafe string for safe input (...

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
parent 3d52ce73
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)``."""