Opened 7 years ago

Closed 7 years ago

#27803 closed New feature (fixed)

Don't escape lazy safe strings in conditional_escape

Reported by: Claude Paroz Owned by: Claude Paroz
Component: Utilities Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If you set up a lazy safe string, for example:

field.label = ugettext_lazy(mark_safe("My <b>bold</b> label"))

conditional_escape(field.label) as will be called by the template system should not escape the string markup.

Change History (4)

comment:1 by Claude Paroz, 7 years ago

Has patch: set

comment:2 by Tim Graham, 7 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Tim Graham, 7 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by Claude Paroz <claude@…>, 7 years ago

Resolution: fixed
Status: assignedclosed

In a21ec124:

Fixed #27803 -- Kept safe status of lazy safe strings in conditional_escape

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