From 7a1fbd37e9fb262432daed6eefc4e9c54ceff406 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Fri, 11 Aug 2017 19:30:21 -0400 Subject: [PATCH] Fix bug in upload HTML checker. If a chunk was passed into the check_html function - e.g. it was read from a compressed file - it would search through each character in the string for certain HTML content instead of each line in the string. --- lib/galaxy/util/checkers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/galaxy/util/checkers.py b/lib/galaxy/util/checkers.py index 85110e67e13..0e86b28643f 100644 --- a/lib/galaxy/util/checkers.py +++ b/lib/galaxy/util/checkers.py @@ -14,6 +14,8 @@ HTML_CHECK_LINES = 100 def check_html( file_path, chunk=None ): if chunk is None: temp = open( file_path, "U" ) + elif hasattr(chunk, "splitlines"): + temp = chunk.splitlines() else: temp = chunk regexp1 = re.compile( "]*HREF[^>]+>", re.I )