jrief / django-angular

Let AngularJS play well with Django
http://django-angular.awesto.com/
MIT License
1.23k stars 293 forks source link

Unquote URL before providing it to PATH_INFO #194

Closed penguin359 closed 9 years ago

penguin359 commented 9 years ago

reverse() creates an RFC 3986 quoted URL path, but PATH_INFO expects an unquoted path. This was causing arguments that had spaces in their value to show up as %20 in a view when access through the Angular URL reversal path.

PATH_INFO from the regular URL lookup: u'PATH_INFO': u'/report/user1-my space name/',

PATH_INFO from /angular/reverse/ lookup: u'PATH_INFO': u'/report/user1-my%20space%20name/',

jrief commented 9 years ago

@jkosir this sounds reasonable. Shall I (or you) merge it?

jkosir commented 9 years ago

Yep, makes sense. Thanks!