0
0
mirror of https://github.com/django/django.git synced 2024-11-29 06:03:25 +01:00

Refs #24046 -- Removed redundant condition in render_value_in_context()

Calling conditional_escape() on SafeData won't change it.
This commit is contained in:
Tim Graham 2016-01-24 13:41:25 -05:00
parent 49c57f8565
commit bf3057d10b

View File

@ -1012,8 +1012,7 @@ def render_value_in_context(value, context):
value = template_localtime(value, use_tz=context.use_tz)
value = localize(value, use_l10n=context.use_l10n)
value = force_text(value)
if ((context.autoescape and not isinstance(value, SafeData)) or
isinstance(value, EscapeData)):
if context.autoescape or isinstance(value, EscapeData):
return conditional_escape(value)
else:
return value