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:
parent
55a42e8afa
commit
16b02b6768
@ -97,6 +97,9 @@ if ( ! CUSTOM_TAGS ) {
|
||||
'src' => true,
|
||||
),
|
||||
'b' => array(),
|
||||
'bdo' => array(
|
||||
'dir' => true,
|
||||
),
|
||||
'big' => array(),
|
||||
'blockquote' => array(
|
||||
'cite' => true,
|
||||
|
@ -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 = '<p>This is <bdo dir="rtl">a BDO tag</bdo>. Weird, <bdo dir="ltr">right?</bdo></p>';
|
||||
|
||||
$this->assertEquals( $input, wp_kses( $input, $allowedposttags ) );
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user