WordPress.org

Make WordPress Core

Opened 20 months ago

Closed 20 months ago

Last modified 20 months ago

#26187 closed defect (bug) (fixed)

Translation function used instead of just escaping in wp-admin/includes/nav-menu.php

Reported by: yoavf Owned by: ocean90
Milestone: 3.8 Priority: normal
Severity: normal Version: 3.6
Component: Menus Keywords: has-patch commit
Focuses: Cc:

Description

Line 850, esc_attr_e used instead of just esc_attr - no translation needed here. Since r23441.

Attachments (2)

wrong-escpaing-function.diff (916 bytes) - added by yoavf 20 months ago.
26187.diff (921 bytes) - added by mattheu 20 months ago.
Update patch - esc_attr does not echo

Download all attachments as: .zip

Change History (8)

@mattheu20 months ago

Update patch - esc_attr does not echo

comment:1 @mattheu20 months ago

Need to echo the escaped string when using esc_attr

comment:2 @ocean9020 months ago

  • Component changed from General to Menus
  • Keywords commit added
  • Milestone set to 3.8
  • Version changed from 3.7.1 to 3.6

comment:3 @ocean9020 months ago

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

In 26347:

Don't use esc_attr_e() function for a non-translatable context.

props yoavf, mattheu.
fixes #26187.

comment:4 @markoheijnen20 months ago

There is another line in there: esc_attr_e( __( 'Add to Menu' ) ) what can be esc_attr_e( 'Add to Menu' ) right?

Last edited 20 months ago by SergeyBiryukov (previous) (diff)

comment:5 @ocean9020 months ago

markoheijnen, patch? :-)

comment:6 @SergeyBiryukov20 months ago

In 26349:

Remove redundant translation function calls.

props markoheijnen.
see #26187.

Note: See TracTickets for help on using tickets.