WordPress.org

Make WordPress Core

Opened 6 months ago

Closed 5 months ago

Last modified 5 months ago

#53153 closed enhancement (fixed)

Use one function for escaping and retrieving the translation

Reported by: dimadin Owned by: davidbaumwald
Milestone: 5.8 Priority: normal
Severity: trivial Version:
Component: I18N Keywords: has-patch commit
Focuses: Cc:

Description

There are a few places that use functions for translating text and then escape that text using functions for escaping. Instead, we can use functions that translate and escape text in one pass, like it's done in the rest of the code.

Change History (4)

#2 @SergeyBiryukov
6 months ago

  • Component changed from General to I18N
  • Keywords commit added
  • Milestone changed from Awaiting Review to 5.8
  • Owner set to davidbaumwald
  • Status changed from new to assigned

Thanks for the PR, looks good to me :)

#3 @davidbaumwald
5 months ago

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

In 50931:

I18N: Combine escaping and translation functions.

There are a few instances where two separate functions are used for both escaping and translating output. This change combines the two functions into the appropriate Core helper function.

Props dimadin, SergeyBiryukov.
Fixes #53153.

Note: See TracTickets for help on using tickets.