mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	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:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user