Ticket #5041: quoteurl.patch

File quoteurl.patch, 644 bytes (added by jdetaeye@…, 17 years ago)

More complete url escape function

  • django/contrib/admin/views/main.py

     
    5656    quoting is slightly different so that it doesn't get automatically
    5757    unquoted by the Web browser.
    5858    """
    59     if type(s) != type(''):
    60         return s
     59    if not isinstance(s,basestring): return s
    6160    res = list(s)
    6261    for i in range(len(res)):
    6362        c = res[i]
    64         if c in ':/_':
     63        if c in ':/_#?;@&=+$,"<>%':
    6564            res[i] = '_%02X' % ord(c)
    6665    return ''.join(res)
    6766
Back to Top