changeset 6044:c30de53bd126

do not call dict() on MultiDict instances, but .to_dict() bugfix for "repr-like" values in fullsearch urls: ...?action=[u'fullsearch']&...
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 29 Apr 2014 10:42:46 +0200
parents 1306560f158e
children f029e42ecdec
files MoinMoin/action/fullsearch.py MoinMoin/search/results.py MoinMoin/wikiutil.py
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/fullsearch.py	Mon Apr 28 21:55:23 2014 +0200
+++ b/MoinMoin/action/fullsearch.py	Tue Apr 29 10:42:46 2014 +0200
@@ -212,7 +212,7 @@
             return
     if not results.hits: # no hits?
         f = request.formatter
-        querydict = dict(wikiutil.parseQueryString(request.query_string))
+        querydict = wikiutil.parseQueryString(request.query_string).to_dict()
         querydict.update({'titlesearch': 0})
 
         request.theme.add_msg(_('Your search query {{{"%s"}}} didn\'t return any results. '
@@ -241,7 +241,7 @@
     hints = []
 
     if titlesearch:
-        querydict = dict(wikiutil.parseQueryString(request.query_string))
+        querydict = wikiutil.parseQueryString(request.query_string).to_dict()
         querydict.update({'titlesearch': 0})
 
         hints.append(''.join([
--- a/MoinMoin/search/results.py	Mon Apr 28 21:55:23 2014 +0200
+++ b/MoinMoin/search/results.py	Tue Apr 29 10:42:46 2014 +0200
@@ -687,7 +687,7 @@
         """
         _ = self.request.getText
         f = self.formatter
-        querydict = dict(wikiutil.parseQueryString(self.request.query_string))
+        querydict = wikiutil.parseQueryString(self.request.query_string).to_dict()
 
         def page_url(n):
             querydict.update({'from': n * hitsPerPage})
--- a/MoinMoin/wikiutil.py	Mon Apr 28 21:55:23 2014 +0200
+++ b/MoinMoin/wikiutil.py	Tue Apr 29 10:42:46 2014 +0200
@@ -121,7 +121,7 @@
 def parseQueryString(qstr, want_unicode=None):
     """ see werkzeug.url_decode
 
-        Please note: this returns a MultiDict, you might need to use dict() on
+        Please note: this returns a MultiDict, you might need to use .to_dict() on
                      the result if your code expects a "normal" dict.
     """
     try: