Make WordPress Core

#61341 closed defect (bug) (fixed)

Lack of escaping in Moment.js localization

Reported by: swissspidy's profile swissspidy Owned by: audrasjb's profile audrasjb
Milestone: 6.6 Priority: low
Severity: minor Version:
Component: Script Loader Keywords: has-patch commit
Focuses: Cc:

Description

If for some reason get_user_locale() doesn't return a simply string, it can break the inline script added for Moment.js localization here: https://github.com/WordPress/wordpress-develop/blob/2c818502ea70b27c36f420112152b26bd0ebe8fe/src/wp-includes/script-loader.php#L146-L147

Attachments (1)

61341.diff (475 bytes) - added by swissspidy 10 months ago.

Download all attachments as: .zip

Change History (3)

@swissspidy
10 months ago

#1 @swissspidy
10 months ago

  • Keywords commit added

#2 @audrasjb
10 months ago

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

In 58288:

Script Loader: Add missing escaping function to Moment.js string localization.

This changeset avoids breaking the inline script added for Moment.js localization if for some reason get_user_locale() doesn't return a simply string.

Props swissspidy.
Fixes #61341.

Note: See TracTickets for help on using tickets.