#14676 closed (fixed)
removetags is case-sensitive
Description ¶
The removetags filter is case-sensitive.
Example:
{{ value|removetags:"a" }}
...will not remove the tag <A href="/foo">.
Instead you must do this:
{{ value|removetags:"a A" }}
I found this rather startling. If it can't be remedied, it should certainly be mentioned in the docs, e.g. on http://docs.djangoproject.com/en/1.2/ref/templates/builtins/
Change History (6)
comment:1 by , 14 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 14 years ago
Owner: | changed from | to
---|
by , 14 years ago
Attachment: | patch.diff added |
---|
comment:3 by , 14 years ago
Has patch: | set |
---|
comment:4 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 by , 14 years ago
Note:
See TracTickets
for help on using tickets.
Interesting, this is one of those places where [X]HTML agnosticism may have us in a bind. Proper XML (and XHTML) are case-sensitive, whereas HTML is not. Accepting this in some form, either the code needs to be changed or this needs to be documented.