mitsuhiko/werkzeug — Issue #152: MapAdapter.get_default_redirect calls url_quote twice
Author: genkijuke
Created: 2012-01-07 10:35:15+00:00
State: open

```python
def get_default_redirect(self, rule, method, values, query_args):
...
...
domain_part, path = r.build(values)
return self.make_redirect_url(
path, query_args, domain_part=domain_part)
```

Both `r.build(...)` and `self.make_redirect_url(...)` call *url_quote* internally, so this method returns broken URLs when they contain symbols (@$*~ etc.) or non-ascii charactors.

I think it should be:

```python
domain_part, path = r.build(values)
path = url_unquote(path, self.map.charset)
return self.make_redirect_url(
path, query_args, domain_part=domain_part)
```