From f1773beb0cbe39559237a8084196350df81210dd Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 21 May 2018 12:43:27 +0000 Subject: [PATCH] Widgets: Allow basic inline tags in `wp_sidebar_description()`. The customizer has allowed HTML in sidebar descriptions since adding support for sidebars. This change ensures that basic HTML is also allowed for them in the widgets admin screen. Props flixos90. Merges [43275] to the 4.9 branch. Fixes #42608. Built from https://develop.svn.wordpress.org/branches/4.9@43302 git-svn-id: http://core.svn.wordpress.org/branches/4.9@43131 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-includes/widgets.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 764162f42e..11ee3a5673 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9.7-alpha-43301'; +$wp_version = '4.9.7-alpha-43302'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index 1e939e173d..683c7ab913 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -420,8 +420,9 @@ function wp_sidebar_description( $id ) { global $wp_registered_sidebars; - if ( isset($wp_registered_sidebars[$id]['description']) ) - return esc_html( $wp_registered_sidebars[$id]['description'] ); + if ( isset( $wp_registered_sidebars[ $id ]['description'] ) ) { + return wp_kses( $wp_registered_sidebars[ $id ]['description'], 'sidebar_description' ); + } } /**