Ticket #5041: quoteurl.patch
File quoteurl.patch, 644 bytes (added by , 17 years ago) |
---|
-
django/contrib/admin/views/main.py
56 56 quoting is slightly different so that it doesn't get automatically 57 57 unquoted by the Web browser. 58 58 """ 59 if type(s) != type(''): 60 return s 59 if not isinstance(s,basestring): return s 61 60 res = list(s) 62 61 for i in range(len(res)): 63 62 c = res[i] 64 if c in ':/_ ':63 if c in ':/_#?;@&=+$,"<>%': 65 64 res[i] = '_%02X' % ord(c) 66 65 return ''.join(res) 67 66