Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#14676 closed (fixed)

removetags is case-sensitive

Reported by: peterh32 Owned by: elbarto
Component: Documentation Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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/

Attachments (1)

patch.diff (599 bytes ) - added by elbarto 14 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by Alex Gaynor, 14 years ago

Triage Stage: UnreviewedAccepted

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.

comment:2 by elbarto, 14 years ago

Owner: changed from nobody to elbarto

by elbarto, 14 years ago

Attachment: patch.diff added

comment:3 by elbarto, 14 years ago

Has patch: set

comment:4 by Tim Graham, 14 years ago

Resolution: fixed
Status: newclosed

(In [14925]) Fixed #14676 - Document that the removetags filter is case-sensitive. Thanks peterh32 for the report and elbarto for the patch.

comment:5 by Tim Graham, 14 years ago

(In [14926]) [1.2.X] Fixed #14676 - Document that the removetags filter is case-sensitive. Thanks peterh32 for the report and elbarto for the patch.

Backport of r14925 from trunk.

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