Mail: Fix character encoding issues in Plugin/Theme background update emails.

This changeset fixes encoding issues in background update emails by applying `html_entity_decode()` on Plugin/Theme names in `send_plugin_theme_email()`.

Props paulschreiber, audrasjb, benjgrolleau, sanketchodavadiya, robinwpdeveloper, paulamit.
Fixes #56964.

Built from https://develop.svn.wordpress.org/trunk@55411


git-svn-id: http://core.svn.wordpress.org/trunk@54944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2023-02-23 10:07:26 +00:00
parent e61ec90f68
commit 8771b175cd
2 changed files with 9 additions and 9 deletions

View File

@ -1112,7 +1112,7 @@ class WP_Automatic_Updater {
$body_message .= sprintf( $body_message .= sprintf(
/* translators: 1: Plugin name, 2: Current version number, 3: New version number, 4: Plugin URL. */ /* translators: 1: Plugin name, 2: Current version number, 3: New version number, 4: Plugin URL. */
__( '- %1$s (from version %2$s to %3$s)%4$s' ), __( '- %1$s (from version %2$s to %3$s)%4$s' ),
$item->name, html_entity_decode( $item->name ),
$item->item->current_version, $item->item->current_version,
$item->item->new_version, $item->item->new_version,
$item_url $item_url
@ -1121,7 +1121,7 @@ class WP_Automatic_Updater {
$body_message .= sprintf( $body_message .= sprintf(
/* translators: 1: Plugin name, 2: Version number, 3: Plugin URL. */ /* translators: 1: Plugin name, 2: Version number, 3: Plugin URL. */
__( '- %1$s version %2$s%3$s' ), __( '- %1$s version %2$s%3$s' ),
$item->name, html_entity_decode( $item->name ),
$item->item->new_version, $item->item->new_version,
$item_url $item_url
); );
@ -1144,7 +1144,7 @@ class WP_Automatic_Updater {
$body[] = sprintf( $body[] = sprintf(
/* translators: 1: Theme name, 2: Current version number, 3: New version number. */ /* translators: 1: Theme name, 2: Current version number, 3: New version number. */
__( '- %1$s (from version %2$s to %3$s)' ), __( '- %1$s (from version %2$s to %3$s)' ),
$item->name, html_entity_decode( $item->name ),
$item->item->current_version, $item->item->current_version,
$item->item->new_version $item->item->new_version
); );
@ -1152,7 +1152,7 @@ class WP_Automatic_Updater {
$body[] = sprintf( $body[] = sprintf(
/* translators: 1: Theme name, 2: Version number. */ /* translators: 1: Theme name, 2: Version number. */
__( '- %1$s version %2$s' ), __( '- %1$s version %2$s' ),
$item->name, html_entity_decode( $item->name ),
$item->item->new_version $item->item->new_version
); );
} }
@ -1184,7 +1184,7 @@ class WP_Automatic_Updater {
$body_message .= sprintf( $body_message .= sprintf(
/* translators: 1: Plugin name, 2: Current version number, 3: New version number, 4: Plugin URL. */ /* translators: 1: Plugin name, 2: Current version number, 3: New version number, 4: Plugin URL. */
__( '- %1$s (from version %2$s to %3$s)%4$s' ), __( '- %1$s (from version %2$s to %3$s)%4$s' ),
$item->name, html_entity_decode( $item->name ),
$item->item->current_version, $item->item->current_version,
$item->item->new_version, $item->item->new_version,
$item_url $item_url
@ -1193,7 +1193,7 @@ class WP_Automatic_Updater {
$body_message .= sprintf( $body_message .= sprintf(
/* translators: 1: Plugin name, 2: Version number, 3: Plugin URL. */ /* translators: 1: Plugin name, 2: Version number, 3: Plugin URL. */
__( '- %1$s version %2$s%3$s' ), __( '- %1$s version %2$s%3$s' ),
$item->name, html_entity_decode( $item->name ),
$item->item->new_version, $item->item->new_version,
$item_url $item_url
); );
@ -1215,7 +1215,7 @@ class WP_Automatic_Updater {
$body[] = sprintf( $body[] = sprintf(
/* translators: 1: Theme name, 2: Current version number, 3: New version number. */ /* translators: 1: Theme name, 2: Current version number, 3: New version number. */
__( '- %1$s (from version %2$s to %3$s)' ), __( '- %1$s (from version %2$s to %3$s)' ),
$item->name, html_entity_decode( $item->name ),
$item->item->current_version, $item->item->current_version,
$item->item->new_version $item->item->new_version
); );
@ -1223,7 +1223,7 @@ class WP_Automatic_Updater {
$body[] = sprintf( $body[] = sprintf(
/* translators: 1: Theme name, 2: Version number. */ /* translators: 1: Theme name, 2: Version number. */
__( '- %1$s version %2$s' ), __( '- %1$s version %2$s' ),
$item->name, html_entity_decode( $item->name ),
$item->item->new_version $item->item->new_version
); );
} }

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.2-beta3-55410'; $wp_version = '6.2-beta3-55411';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.