Make WordPress Core


Ignore:
Timestamp:
05/25/2021 01:42:20 AM (4 years ago)
Author:
jorbin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/kses.php

    r50923 r50987  
    14791479        $this->assertSame( $html, wp_kses_post( $html ) );
    14801480    }
     1481
     1482    /**
     1483     * Test filtering a standard main tag.
     1484     *
     1485     * @ticket 53156
     1486     */
     1487    function test_wp_kses_main_tag_standard_attributes() {
     1488        $test = array(
     1489            '<main',
     1490            'class="wp-group-block"',
     1491            'style="padding:10px"',
     1492            '/>',
     1493        );
     1494
     1495        $html = implode( ' ', $test );
     1496
     1497        $this->assertSame( $html, wp_kses_post( $html ) );
     1498    }
    14811499}
Note: See TracChangeset for help on using the changeset viewer.