diff --git a/src/wp-includes/kses.php b/src/wp-includes/kses.php index 9504f48679..d34608b89f 100644 --- a/src/wp-includes/kses.php +++ b/src/wp-includes/kses.php @@ -97,6 +97,9 @@ if ( ! CUSTOM_TAGS ) { 'src' => true, ), 'b' => array(), + 'bdo' => array( + 'dir' => true, + ), 'big' => array(), 'blockquote' => array( 'cite' => true, diff --git a/tests/phpunit/tests/kses.php b/tests/phpunit/tests/kses.php index 5c053513be..c4c1e8e24c 100644 --- a/tests/phpunit/tests/kses.php +++ b/tests/phpunit/tests/kses.php @@ -374,7 +374,7 @@ EOF; $this->assertEquals( '¾', wp_kses_normalize_entities( '¾' ) ); $this->assertEquals( '∴', wp_kses_normalize_entities( '∴' ) ); } - + /** * Test removal of invalid binary data for HTML. * @@ -411,7 +411,7 @@ EOF; ), ); } - + /** * Test removal of '\0' strings. * @@ -423,7 +423,7 @@ EOF; return $this->assertEquals( $output, wp_kses( $input, $allowedposttags ) ); } - + function data_slash_zero_removal() { return array( array( @@ -642,4 +642,15 @@ EOF; ), ); } + + /** + * @ticket 34063 + */ + function test_bdo() { + global $allowedposttags; + + $input = '

This is a BDO tag. Weird, right?

'; + + $this->assertEquals( $input, wp_kses( $input, $allowedposttags ) ); + } }