Opened 17 years ago
Closed 17 years ago
#5952 closed (fixed)
escape filter doesn't work inside blocktrans
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | Keywords: | ||
Cc: | cedric@… | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
(tested in [6675])
Within templates, with the new auto-escaping mechanism:
{% blocktrans with title|escape as the_title %}{{ the_title }}{% endblocktrans %}
will *not* escape the variable title
Replacing that by
{% blocktrans with title|force_escape as the_title %}{{ the_title }}{% endblocktrans %}
works properly though.
Please see the attached self-containing project.
Attachments (1)
Change History (3)
by , 17 years ago
comment:1 by , 17 years ago
Cc: | added |
---|
comment:2 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [6682]) Fixed a few problems with variable resolving inside of blocktrans tags. A couple of these were exposed by the auto-escaping changes, but I suspect the other one has been hiding in plain sight for a while.
Fixed #5952, #5953