Opened 16 years ago

Closed 16 years ago

#5952 closed (fixed)

escape filter doesn't work inside blocktrans

Reported by: Cedric Rossi <cedric@…> 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)

test.zip (6.1 KB ) - added by Cedric Rossi <cedric@…> 16 years ago.

Download all attachments as: .zip

Change History (3)

by Cedric Rossi <cedric@…>, 16 years ago

Attachment: test.zip added

comment:1 by Cedric Rossi <cedric@…>, 16 years ago

Cc: cedric@… added

comment:2 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: newclosed

(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

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