mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Formatting: Add 'main' tag to kses
`main` is a valid HTML element that is especially valuable for KSES to support in light of full site editing. Related: https://github.com/WordPress/gutenberg/pull/28576 for the addition of `main` to the group block. Fixes #53156. Props glendaviesnz. git-svn-id: https://develop.svn.wordpress.org/trunk@50987 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -252,6 +252,12 @@ if ( ! CUSTOM_TAGS ) {
|
||||
'align' => true,
|
||||
'value' => true,
|
||||
),
|
||||
'main' => array(
|
||||
'align' => true,
|
||||
'dir' => true,
|
||||
'lang' => true,
|
||||
'xml:lang' => true,
|
||||
),
|
||||
'map' => array(
|
||||
'name' => true,
|
||||
),
|
||||
|
||||
@@ -1478,4 +1478,22 @@ EOF;
|
||||
|
||||
$this->assertSame( $html, wp_kses_post( $html ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Test filtering a standard main tag.
|
||||
*
|
||||
* @ticket 53156
|
||||
*/
|
||||
function test_wp_kses_main_tag_standard_attributes() {
|
||||
$test = array(
|
||||
'<main',
|
||||
'class="wp-group-block"',
|
||||
'style="padding:10px"',
|
||||
'/>',
|
||||
);
|
||||
|
||||
$html = implode( ' ', $test );
|
||||
|
||||
$this->assertSame( $html, wp_kses_post( $html ) );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user