diff options
| -rw-r--r-- | pyramid/url.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pyramid/url.py b/pyramid/url.py index fda2c72c7..2e3542161 100644 --- a/pyramid/url.py +++ b/pyramid/url.py @@ -222,7 +222,9 @@ class URLMethodsMixin(object): if '_query' in kw: query = kw.pop('_query') - if query: + if isinstance(query, text_type): + qs = '?' + native_(query) + elif query: qs = '?' + urlencode(query, doseq=True) if '_anchor' in kw: @@ -580,7 +582,9 @@ class URLMethodsMixin(object): if 'query' in kw: query = kw['query'] - if query: + if isinstance(query, text_type): + qs = '?' + native_(query) + elif query: qs = '?' + urlencode(query, doseq=True) if 'anchor' in kw: |
