political-memory / political_memory

WARNING: this repository has now moved to https://git.laquadrature.net/memopol/memopol
https://memopol.lqdn.fr/
12 stars 2 forks source link

Kwargs not escaped in group URL #94

Open njoyard opened 8 years ago

njoyard commented 8 years ago

Example with "Group of the Greens/European Free Alliance" => should escape the slash

See http://s.yourlabs.org/sentry/lqdn/issues/3560/

njoyard commented 8 years ago

I investigated for a bit and it seems django's reverse does not escape arguments (nor does the url matcher unescape them). There's quite a bit of discussion about this in ticket #22223 and it seems they don't assume the responsibility for encoding/decoding url kwargs.

So IMO we should urlencode url kwargs ourselves and decode them when used, even if I personnaly think this should be the responsibility of django.urls. What do you think @jpic ?