mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Fix #2194 allow <details> amd <summary> tags
This commit is contained in:
parent
741f725bcf
commit
5ae810a54c
2 changed files with 7 additions and 0 deletions
|
|
@ -255,6 +255,8 @@ class HTMLFilter
|
|||
$def->addElement('section', 'Block', 'Flow', 'Common');
|
||||
$def->addElement('article', 'Block', 'Flow', 'Common');
|
||||
$def->addElement('aside', 'Block', 'Flow', 'Common');
|
||||
$def->addElement('details', 'Block', 'Flow', 'Common');
|
||||
$def->addElement('summary', 'Block', 'Flow', 'Common');
|
||||
|
||||
// Add various inline tags.
|
||||
$def->addElement('s', 'Inline', 'Inline', 'Common');
|
||||
|
|
@ -313,6 +315,7 @@ class HTMLFilter
|
|||
));
|
||||
|
||||
// Support additional properties.
|
||||
$def->addAttribute('details', 'open', 'Bool');
|
||||
$def->addAttribute('i', 'aria-hidden', 'Text');
|
||||
$def->addAttribute('img', 'srcset', 'Text');
|
||||
$def->addAttribute('img', 'data-file-srl', 'Number');
|
||||
|
|
|
|||
|
|
@ -83,6 +83,10 @@ class HTMLFilterTest extends \Codeception\TestCase\Test
|
|||
$source = '<div contenteditable="true"><div contenteditable="false"><p contenteditable="false"></p></div></div>';
|
||||
$target = '<div><div contenteditable="false"><p contenteditable="false"></p></div></div>';
|
||||
$this->assertEquals($target, Rhymix\Framework\Filters\HTMLFilter::clean($source));
|
||||
|
||||
$source = '<details open><summary>Summary</summary><div>Content</div><p>Paragraph</p></details>';
|
||||
$target = '<details open=""><summary>Summary</summary><div>Content</div><p>Paragraph</p></details>';
|
||||
$this->assertEquals($target, Rhymix\Framework\Filters\HTMLFilter::clean($source));
|
||||
}
|
||||
|
||||
public function testHTMLFilterCSS3()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue