Source

trac-ticketlinks / trac / util / text.py

Diff from to

File trac/util/text.py

     return '&'.join(l)
 
 
+_qs_quote_safe = ''.join(chr(c) for c in xrange(0x21, 0x7f))
+
+def quote_query_string(text):
+    """Quote strings for query string
+    """
+    return unicode_quote_plus(text, _qs_quote_safe)
+
 def to_utf8(text, charset='iso-8859-15'):
     """Convert a string to UTF-8, assuming the encoding is either UTF-8, ISO
     Latin-1, or as specified by the optional `charset` parameter.