Opened 19 years ago

Closed 18 years ago

#1266 closed defect (wontfix)

Default filter URLENCODE enhacement

Reported by: mordaha Owned by: Adrian Holovaty
Component: Template system Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Old style:

var = "123/123"

{{ var|urlencode }}

produces output:
123/123

New style:

{{ var|urlencode:"" }}

produces output:
123%4F123

{{ var|urlencode:"/" }}

produces output:
123/123

New code:

def urlencode(value, arg=''):
    "Escapes a value for use in a URL"
    import urllib
    return urllib.quote(value, arg)

Change History (1)

comment:1 by Adrian Holovaty, 18 years ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top