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
1 changed files with 1 additions and 2 deletions

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