KSES: have you ever heard of the `<bdo>` HTML tag? Same. http://www.w3schools.com/tags/tag_bdo.asp

Adds unit test.

Props iandunn.
Fixes #34063.


git-svn-id: https://develop.svn.wordpress.org/trunk@35141 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-10-13 17:17:13 +00:00
parent 55a42e8afa
commit 16b02b6768
2 changed files with 17 additions and 3 deletions

View File

@ -97,6 +97,9 @@ if ( ! CUSTOM_TAGS ) {
'src' => true,
),
'b' => array(),
'bdo' => array(
'dir' => true,
),
'big' => array(),
'blockquote' => array(
'cite' => true,

View File

@ -374,7 +374,7 @@ EOF;
$this->assertEquals( '&frac34;', wp_kses_normalize_entities( '&frac34;' ) );
$this->assertEquals( '&there4;', wp_kses_normalize_entities( '&there4;' ) );
}
/**
* 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 = '<p>This is <bdo dir="rtl">a BDO tag</bdo>. Weird, <bdo dir="ltr">right?</bdo></p>';
$this->assertEquals( $input, wp_kses( $input, $allowedposttags ) );
}
}