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.



git-svn-id: https://develop.svn.wordpress.org/trunk@53034 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Wilson
2022-03-31 03:52:31 +00:00
parent d2ab3d1837
commit cab053271e

View File

@@ -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.