Opened 10 years ago

Closed 9 years ago

#1266 closed defect (wontfix)

Default filter URLENCODE enhacement

Reported by: mordaha Owned by: adrian
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: UI/UX:

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 Changed 9 years ago by adrian

  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
Back to Top