Opened 5 years ago

Closed 4 years ago

Last modified 4 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: UI/UX:

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 4 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 5 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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 Changed 4 years ago by elbarto

  • Owner changed from nobody to elbarto

Changed 4 years ago by elbarto

comment:3 Changed 4 years ago by elbarto

  • Has patch set

comment:4 Changed 4 years ago by timo

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:5 Changed 4 years ago by timo

(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