#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)
Change History (2)
by , 18 years ago
Attachment: | better_escape.patch added |
---|
comment:1 by , 18 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
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.