mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-23 00:41:52 +00:00
3b1c40b2fc
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1050 48356398-32a2-884e-a903-53898d9a118a
48 lines
1.1 KiB
PHP
48 lines
1.1 KiB
PHP
<?php
|
|
|
|
require_once 'HTMLPurifier/HTMLModuleHarness.php';
|
|
|
|
class HTMLPurifier_HTMLModule_BdoTest extends HTMLPurifier_HTMLModuleHarness
|
|
{
|
|
|
|
function test() {
|
|
|
|
// max
|
|
$this->assertResult(
|
|
'<span>
|
|
<bdo
|
|
id="test-id"
|
|
class="class-name"
|
|
style="font-weight:bold;"
|
|
title="Title of tag"
|
|
lang="en"
|
|
xml:lang="en"
|
|
dir="rtl"
|
|
>
|
|
#PCDATA <span>Inline</span>
|
|
</bdo>
|
|
</span>', true, array('Attr.EnableID' => true)
|
|
);
|
|
|
|
// min
|
|
$this->assertResult(
|
|
'<bdo></bdo>', '<bdo dir="ltr"></bdo>'
|
|
);
|
|
|
|
// children
|
|
$this->assertResult(
|
|
'<bdo dir="rtl">Text<span></span><div></div></bdo>',
|
|
'<bdo dir="rtl">Text<span></span></bdo>'
|
|
);
|
|
|
|
// global attr
|
|
$this->assertResult(
|
|
'<br dir="ltr" /><span dir="ltr"></span>',
|
|
'<br /><span dir="ltr"></span>'
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|