Mapped URI parameters should be implicitly decoded / unquoted
Open
documentation
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
Maybe I'm missing something, but shouldn't mapped parameter values be implicitly decoded?
```
CITIES_TO_STATE = {
'seattle': 'WA',
'portland': 'OR',
'Los Angeles': 'CA'
}
@app.route('/cities/{city}')
def state_of_city(city):
return {'state': CITIES_TO_STATE[city]}
```
For example, if I'm looking for what state Los Angeles is in, I will do a `GET /cities/Los%20Angeles`. The above handler will not give me the expected answer, because it doesn't unquote `Los%20Angeles` back to `Los Angeles`.
Shouldn't there be a call to do `city = urllib.unquote_plus(request.query_params['city'])` ?
Contributor guide
Assessment
This issue has not been assessed yet.