Source

trac-ticketlinks / trac / search / web_ui.py

Diff from to

trac/search/web_ui.py

 from trac.util.datefmt import format_datetime
 from trac.util.html import find_element
 from trac.util.presentation import Paginator
+from trac.util.text import quote_query_string
 from trac.util.translation import _
 from trac.web import IRequestHandler
 from trac.web.chrome import add_link, add_stylesheet, add_warning, \
         if path:
             href = formatter.href.search(q=path)
             if query:
-                href += '&' + query[1:].replace(' ', '+')
+                href += '&' + quote_query_string(query[1:])
         else:
-            href = formatter.href.search() + query.replace(' ', '+')
+            href = formatter.href.search() + quote_query_string(query)
         href += fragment
         return tag.a(label, class_='search', href=href)