diff options
| author | Malthe Borch <mborch@gmail.com> | 2009-11-25 12:16:56 +0000 |
|---|---|---|
| committer | Malthe Borch <mborch@gmail.com> | 2009-11-25 12:16:56 +0000 |
| commit | 6f01c68cf897ad5116c00c949b6e9ef96de1d658 (patch) | |
| tree | 18e1ad891ad93e306b945bea1db6b9a725a937ef | |
| parent | a7e6f2cdec94fc98c0bb670f545449a9d0a84f58 (diff) | |
| download | pyramid-6f01c68cf897ad5116c00c949b6e9ef96de1d658.tar.gz pyramid-6f01c68cf897ad5116c00c949b6e9ef96de1d658.tar.bz2 pyramid-6f01c68cf897ad5116c00c949b6e9ef96de1d658.zip | |
Fixed issue where ``_query`` would be attempted URL encoded.
| -rw-r--r-- | CHANGES.txt | 4 | ||||
| -rw-r--r-- | repoze/bfg/url.py | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 0fa189a43..6733d939c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -37,6 +37,10 @@ Documentation Bug Fixes ---------- +- When passed ``_query`` is passed to the ``route_url`` function, the + URL encoding routine no longer raises an exception because this is a + dictionary. + - The ACL authorization policy debugging output when ``debug_authorization`` console debugging output was turned on wasn't as clear as it could have been when a view execution was diff --git a/repoze/bfg/url.py b/repoze/bfg/url.py index d94cd429c..6b89e6a42 100644 --- a/repoze/bfg/url.py +++ b/repoze/bfg/url.py @@ -98,10 +98,10 @@ def route_url(route_name, request, *elements, **kw): qs = '' if '_query' in kw: - qs = '?' + urlencode(kw['_query'], doseq=True) + qs = '?' + urlencode(kw.pop('_query'), doseq=True) if '_anchor' in kw: - anchor = kw['_anchor'] + anchor = kw.pop('_anchor') if isinstance(anchor, unicode): anchor = anchor.encode('utf-8') anchor = '#' + anchor |
