Ticket #4074: django-4074-admin-querystring-quote.patch
File django-4074-admin-querystring-quote.patch, 768 bytes (added by , 17 years ago) |
---|
-
main.py
1 import urllib 1 2 from django import oldforms, template 2 3 from django.conf import settings 3 4 from django.contrib.admin.filterspecs import FilterSpec … … 604 605 del p[k] 605 606 elif v is not None: 606 607 p[k] = v 607 return '?' + '&'.join([u'%s=%s' % ( k, v) for k, v in p.items()]).replace(' ', '%20')608 return '?' + '&'.join([u'%s=%s' % (urllib.quote(str(k)), urllib.quote(str(v))) for k, v in p.items()]).replace(' ', '%20') 608 609 609 610 def get_results(self, request): 610 611 paginator = ObjectPaginator(self.query_set, self.lookup_opts.admin.list_per_page)