Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#2862 closed enhancement (wontfix)

[patch] Make escape filter smarter

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

Description

The following patch makes the escape filter (or technically, the escape function in django.utils.html) smarter so it can escape the items of lists, too.

Useful for this sort of thing:

{{ names_list|escape|join:'<br />' }}

Attachments (1)

better_escape.patch (1.7 KB ) - added by Chris Beaven 18 years ago.

Download all attachments as: .zip

Change History (2)

by Chris Beaven, 18 years ago

Attachment: better_escape.patch added

comment:1 by Malcolm Tredinnick, 18 years ago

Resolution: wontfix
Status: newclosed

This has been nixed in the past in favour of the auto-escaping proposal. See this thread on django-developers. I agree with Simon's logic in that thread.

If somebody really needs a slightly more powerful escape filter without the full auto-escape functionality, it can live outside of Django. We don't need multiple ways to achieve the same thing.

Note: See TracTickets for help on using tickets.
Back to Top