From 77858f4b9200ecc0d0db39e77b8dcc3f7e722d83 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Thu, 11 May 2017 19:23:43 +0000 Subject: [PATCH] KSES: Support `'tag' => true` as a shorthand for `'tag' => array()` in `wp_kses_attr()`. `Automatic_Upgrader_Skin::feedback()` had always assumed that this is already the case, now it is. See #20017. Fixes #40680. Built from https://develop.svn.wordpress.org/trunk@40637 git-svn-id: http://core.svn.wordpress.org/trunk@40498 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/kses.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/kses.php b/wp-includes/kses.php index b567e10cde..41dc7f2d94 100644 --- a/wp-includes/kses.php +++ b/wp-includes/kses.php @@ -828,8 +828,9 @@ function wp_kses_attr($element, $attr, $allowed_html, $allowed_protocols) { $xhtml_slash = ' /'; // Are any attributes allowed at all for this element? - if ( ! isset($allowed_html[strtolower($element)]) || count($allowed_html[strtolower($element)]) == 0 ) + if ( ! isset( $allowed_html[ strtolower( $element ) ] ) || true === $allowed_html[ strtolower( $element ) ] || count( $allowed_html[ strtolower( $element ) ] ) == 0 ) { return "<$element$xhtml_slash>"; + } // Split it $attrarr = wp_kses_hair($attr, $allowed_protocols); diff --git a/wp-includes/version.php b/wp-includes/version.php index 8ef2be3b8b..45d89d52af 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-40636'; +$wp_version = '4.8-alpha-40637'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.