domLex = new HTMLPurifier_Lexer_DOMLex();
}
public function testCoreAggressivelyFixLtEmojis()
{
$context = new HTMLPurifier_Context();
$config = HTMLPurifier_Config::createDefault();
$output = $this->domLex->tokenizeHTML('<3', $config, $context);
$this->assertIdentical($output, array(
new HTMLPurifier_Token_Start('b'),
new HTMLPurifier_Token_Text('<3'),
new HTMLPurifier_Token_End('b')
));
}
public function testCoreAggressivelyFixLtComments()
{
$context = new HTMLPurifier_Context();
$config = HTMLPurifier_Config::createDefault();
$output = $this->domLex->tokenizeHTML(' comment -->', $config, $context);
$this->assertIdentical($output, array(
new HTMLPurifier_Token_Comment(' Nested ')
));
}
}
// vim: et sw=4 sts=4