mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 06:37:06 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@40637 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user