Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#53153 closed enhancement (fixed)

Use one function for escaping and retrieving the translation

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


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
3 years 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
3 years 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.