diff --git a/lib/websearch_external_collections.py b/lib/websearch_external_collections.py
index <HASH>..<HASH> 100644
--- a/lib/websearch_external_collections.py
+++ b/lib/websearch_external_collections.py
@@ -331,7 +331,7 @@ def calculate_hosted_collections_results(req, pattern_list, field, hosted_collec
     if not hosted_collections: return (None, None)
 
     vprint = get_verbose_print(req, 'Hosted collections: ', verbosity_level)
-    vprint(3, 'pattern_list = %s, field = %s' % (cgi.escape(pattern_list), cgi.escape(field)))
+    vprint(3, 'pattern_list = %s, field = %s' % (cgi.escape(repr(pattern_list)), cgi.escape(field)))
 
     # firstly we calculate the search parameters, i.e. the actual hosted search engines and the basic search units
     (hosted_search_engines, basic_search_units) = \
WebSearch: external search pattern_list escape fix

* Fixes problem with escaping of pattern_list in external searching
  that slipped in c<I>ce6cee2d3dcf1eef<I>f<I>e<I>a7c8f.