mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-30 19:00:10 +02:00
fix: Avoid a deprecated error when the attribute name is numeric and DirectLex is used (#412)
This commit is contained in:
@@ -222,6 +222,17 @@ a[href|title]
|
||||
$this->assertPurification_AllowedAttributes_local_p_style();
|
||||
}
|
||||
|
||||
public function test_AllowedAttributes_invalidAttributeDueToConsistingOfNumbers_UsingDirectLex()
|
||||
{
|
||||
$this->config->set('HTML.AllowedElements', array('a'));
|
||||
$this->config->set('HTML.AllowedAttributes', 'href');
|
||||
$this->config->set('Core.LexerImpl', 'DirectLex');
|
||||
$this->assertPurification(
|
||||
'<a href="https://example.com/" 10="hoge">Test</a>',
|
||||
'<a href="https://example.com/">Test</a>'
|
||||
);
|
||||
}
|
||||
|
||||
public function test_ForbiddenElements()
|
||||
{
|
||||
$this->config->set('HTML.ForbiddenElements', 'b');
|
||||
|
Reference in New Issue
Block a user