diff --git a/wp-includes/kses.php b/wp-includes/kses.php index 39986f710f..5c77dbd297 100644 --- a/wp-includes/kses.php +++ b/wp-includes/kses.php @@ -159,15 +159,6 @@ if ( ! CUSTOM_TAGS ) { 'lang' => true, 'xml:lang' => true, ), - 'form' => array( - 'action' => true, - 'accept' => true, - 'accept-charset' => true, - 'enctype' => true, - 'method' => true, - 'name' => true, - 'target' => true, - ), 'h1' => array( 'align' => true, ), @@ -564,6 +555,7 @@ function wp_kses_one_attr( $string, $element ) { * Return a list of allowed tags and attributes for a given context. * * @since 3.5.0 + * @since 5.0.1 `form` removed as allowable HTML tag. * * @param string $context The context for which to retrieve tags. Allowed values are * post | strip | data | entities or the name of a field filter such as pre_user_description. @@ -577,7 +569,27 @@ function wp_kses_allowed_html( $context = '' ) { switch ( $context ) { case 'post': - return apply_filters( 'wp_kses_allowed_html', $allowedposttags, $context ); + $tags = apply_filters( 'wp_kses_allowed_html', $allowedposttags, $context ); + + // 5.0.1 removed the `