Fixed an edge-case for auto-escaping: if the stringfilter decorator is used and
generates a first argument that is a safe string, make the is_safe handling work as expect. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6721 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
2d0d6620e6
commit
dc716112a7
|
@ -25,6 +25,8 @@ def stringfilter(func):
|
|||
if args:
|
||||
args = list(args)
|
||||
args[0] = force_unicode(args[0])
|
||||
if isinstance(args[0], SafeData) and getattr(func, 'is_safe', False):
|
||||
return mark_safe(func(*args, **kwargs))
|
||||
return func(*args, **kwargs)
|
||||
|
||||
# Include a reference to the real function (used to check original
|
||||
|
|
Loading…
Reference in New Issue