From 18ace8bef499d5296fc71a590d3f20acb95f6348 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Thu, 31 Mar 2022 03:54:02 +0000 Subject: [PATCH] KSES: Document HTML allow list is in lowercase. Expand documentation of the `wp_kses_allowed_html` hook to indicate that developers must add permitted HTML tags and attributes in lowercase for KSES to recognise they are permitted. Props r-a-y, SergeyBiryukov, peterwilsoncc. Fixes #55407. See #53399. Built from https://develop.svn.wordpress.org/trunk@53034 git-svn-id: http://core.svn.wordpress.org/trunk@52623 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/kses.php | 4 ++++ wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-includes/kses.php b/wp-includes/kses.php index 03a4881fb3..b32df1beaa 100644 --- a/wp-includes/kses.php +++ b/wp-includes/kses.php @@ -820,6 +820,10 @@ function wp_kses_allowed_html( $context = '' ) { /** * Filters the HTML tags that are allowed for a given context. * + * HTML tags and attribute names are case-insensitive in HTML but must be + * added to the KSES allow list in lowercase. An item added to the allow list + * in upper or mixed case will not recognized as permitted by KSES. + * * @since 3.5.0 * * @param array[] $html Allowed HTML tags. diff --git a/wp-includes/version.php b/wp-includes/version.php index 2ab45982ae..f5a1213f50 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-53033'; +$wp_version = '6.0-alpha-53034'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.