Ticket #9586: admin.patch
File admin.patch, 943 bytes (added by , 16 years ago) |
---|
-
django/contrib/admin/widgets.py
11 11 from django.utils.translation import ugettext as _ 12 12 from django.utils.safestring import mark_safe 13 13 from django.utils.encoding import force_unicode 14 from django.utils.http import urlquote 14 15 from django.conf import settings 15 16 16 17 class FilteredSelectMultiple(forms.SelectMultiple): … … 91 92 output = [] 92 93 if value and hasattr(value, "url"): 93 94 output.append('%s <a target="_blank" href="%s">%s</a> <br />%s ' % \ 94 (_('Currently:'), value.url, value, _('Change:')))95 (_('Currently:'), urlquote(value.url), value, _('Change:'))) 95 96 output.append(super(AdminFileWidget, self).render(name, value, attrs)) 96 97 return mark_safe(u''.join(output)) 97 98