From b0c25f8642f07ce53d282fc5233ae569ebdfcd5f Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Mon, 5 Jan 2015 09:06:01 -0500 Subject: [PATCH] Slight modification to prevent unintentional (safe and unused, but still) reassignment of parameter 'value' in loop. --- lib/tool_shed/util/web_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tool_shed/util/web_util.py b/lib/tool_shed/util/web_util.py index c75f3747ff3..78b93e108ab 100644 --- a/lib/tool_shed/util/web_util.py +++ b/lib/tool_shed/util/web_util.py @@ -4,7 +4,7 @@ ALLOWED_ELEMENTS = ["", "", "
"] ALLOWED_MAP = dict(map(lambda x: (x, raw_escape(x)), ALLOWED_ELEMENTS)) -def escape( value ): +def escape( string ): """ A tool shed variant of markupsafe.escape that allows a select few HTML elements that are repeatedly used in messages created deep in the toolshed components. Ideally abstract things would be produced @@ -14,7 +14,7 @@ def escape( value ): >>> escape("A repo") u'A repo' """ - escaped = str( raw_escape( value ) ) + escaped = str( raw_escape( string ) ) # Unescape few selected tags. for key, value in ALLOWED_MAP.iteritems(): escaped = escaped.replace(value, key)