Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#30012 closed defect (bug) (fixed)

Replace escaped translations with proper function

Reported by: obenland's profile obenland Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.1 Priority: normal
Severity: normal Version:
Component: I18N Keywords: good-first-bug has-patch
Focuses: Cc:

Description

There are ten instances of esc_attr( __() ) across the WordPress codebase, as of revision 29927.
Replacing them with esc_attr__() would be a great opportunity for a beginning contributor to get their feet wet.

There is also one instance of esc_html( _x() ) that could be replaced with esc_html_x().

Attachments (2)

30012.diff (5.2 KB) - added by jcastaneda 10 years ago.
30012.2.diff (5.9 KB) - added by jcastaneda 10 years ago.

Download all attachments as: .zip

Change History (7)

@jcastaneda
10 years ago

#1 @jcastaneda
10 years ago

Found a little more than 10 running trunk.

@jcastaneda
10 years ago

#2 @jcastaneda
10 years ago

Forgot esc_html_x().

#3 @SergeyBiryukov
10 years ago

  • Keywords has-patch added
  • Owner set to SergeyBiryukov
  • Status changed from new to accepted

wp-includes/script-loader.php can be included when esc_attr__() is not yet available, but it does not run it until did_action( 'init' ), so 30012.2.diff should work.

#4 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 4.1

#5 @SergeyBiryukov
10 years ago

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

In 29961:

Use proper functions for escaped translations.

pros jcastaneda.
fixes #30012.

Note: See TracTickets for help on using tickets.