Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#19479 closed defect (bug) (fixed)

esc_html_e() is only for translations

Reported by: nacin's profile nacin Owned by: ryan's profile ryan
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.3
Component: Widgets Keywords: has-patch commit
Focuses: Cc:

Description


Attachments (1)

19479.diff (615 bytes) - added by nacin 12 years ago.

Download all attachments as: .zip

Change History (6)

@nacin
12 years ago

#1 @nacin
12 years ago

  • Keywords has-patch commit added

#2 @ryan
12 years ago

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

In [19570]:

Don't use a gettext function for a non-translatable context. Props nacin. fixes #19479

#4 @nacin
12 years ago

In [19572]:

Don't use esc_attr_e() function for a non-translatable context. props zeo. fixes #19479.

#5 @nbachiyski
12 years ago

For the sake of completeness, I just want to mention that the parser is smart enough to only grab instances of gettext functions where they are called with literal strings. In these cases esc_attr_e() would have worked ok.

Having said that, I agree it's bad style to rely on the parser smartness.

Note: See TracTickets for help on using tickets.