Plugins: Escape output in error messages.

Props tykoted, paulkevan, peterwilsoncc.
Merges [53960] to the 6.0 branch.
Built from https://develop.svn.wordpress.org/branches/6.0@53963


git-svn-id: http://core.svn.wordpress.org/branches/6.0@53522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2022-08-30 15:23:08 +00:00
parent 29e2d8ff85
commit e7a4fcd163
2 changed files with 3 additions and 3 deletions

View File

@ -612,7 +612,7 @@ if ( ! empty( $invalid ) ) {
/* translators: 1: Plugin file, 2: Error message. */ /* translators: 1: Plugin file, 2: Error message. */
__( 'The plugin %1$s has been deactivated due to an error: %2$s' ), __( 'The plugin %1$s has been deactivated due to an error: %2$s' ),
'<code>' . esc_html( $plugin_file ) . '</code>', '<code>' . esc_html( $plugin_file ) . '</code>',
$error->get_error_message() esc_html( $error->get_error_message() )
); );
echo '</p></div>'; echo '</p></div>';
} }
@ -676,7 +676,7 @@ elseif ( isset( $_GET['deleted'] ) ) :
printf( printf(
/* translators: %s: Error message. */ /* translators: %s: Error message. */
__( 'Plugin could not be deleted due to an error: %s' ), __( 'Plugin could not be deleted due to an error: %s' ),
$delete_result->get_error_message() esc_html( $delete_result->get_error_message() )
); );
?> ?>
</p> </p>

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.0.2-RC1-53962'; $wp_version = '6.0.2-RC1-53963';
/** /**
* 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.