General: Fix array format for allowed HTML passed into wp_kses() for wp_trigger_error().

Kses requires an associative array of allowed HTML.

See #57686. Follow-up to [56707].

Props thelovekesh, westonruter.
Fixes #61318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2024-06-07 16:50:15 +00:00
parent f6e876199a
commit 7529944c8d
2 changed files with 6 additions and 6 deletions

View File

@ -6068,11 +6068,11 @@ function wp_trigger_error( $function_name, $message, $error_level = E_USER_NOTIC
$message = wp_kses( $message = wp_kses(
$message, $message,
array( array(
'a' => array( 'href' ), 'a' => array( 'href' => true ),
'br', 'br' => array(),
'code', 'code' => array(),
'em', 'em' => array(),
'strong', 'strong' => array(),
), ),
array( 'http', 'https' ) array( 'http', 'https' )
); );

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.6-beta1-58360'; $wp_version = '6.6-beta1-58361';
/** /**
* 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.