1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-06 06:07:26 +02:00

Allow <![CDATA[<body>...</body>]]> not to trigger Core.ConvertDocumentToFragment

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
Edward Z. Yang
2008-08-01 19:06:28 -04:00
parent 03dabec2c0
commit 1d90bb2397
3 changed files with 26 additions and 5 deletions

View File

@@ -634,6 +634,26 @@ div {}
);
}
function test_tokenizeHTML_bodyInCDATA() {
$this->assertTokenization(
'<![CDATA[<body>Foo</body>]]>',
array(
new HTMLPurifier_Token_Text('<body>Foo</body>'),
),
array(
'PH5P' => array(
new HTMLPurifier_Token_Text('<'),
new HTMLPurifier_Token_Text('body'),
new HTMLPurifier_Token_Text('>'),
new HTMLPurifier_Token_Text('Foo'),
new HTMLPurifier_Token_Text('<'),
new HTMLPurifier_Token_Text('/body'),
new HTMLPurifier_Token_Text('>'),
),
)
);
}
/*
function test_tokenizeHTML_() {