mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 20:12:14 +09:00
Support contenteditable="false" (fix #1710)
This commit is contained in:
parent
c6b6d71214
commit
1c47785276
2 changed files with 7 additions and 0 deletions
|
|
@ -270,6 +270,9 @@ class HTMLFilter
|
||||||
$def->addAttribute('img', 'srcset', 'Text');
|
$def->addAttribute('img', 'srcset', 'Text');
|
||||||
$def->addAttribute('img', 'data-file-srl', 'Number');
|
$def->addAttribute('img', 'data-file-srl', 'Number');
|
||||||
$def->addAttribute('iframe', 'allowfullscreen', 'Bool');
|
$def->addAttribute('iframe', 'allowfullscreen', 'Bool');
|
||||||
|
|
||||||
|
// Support contenteditable="false" (#1710)
|
||||||
|
$def->addAttribute('div', 'contenteditable', 'Enum#false');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,10 @@ class HTMLFilterTest extends \Codeception\TestCase\Test
|
||||||
$source = '<nav>123</nav><section>456</section><article>789</article><aside>0</aside>';
|
$source = '<nav>123</nav><section>456</section><article>789</article><aside>0</aside>';
|
||||||
$target = '<nav>123</nav><section>456</section><article>789</article><aside>0</aside>';
|
$target = '<nav>123</nav><section>456</section><article>789</article><aside>0</aside>';
|
||||||
$this->assertEquals($target, Rhymix\Framework\Filters\HTMLFilter::clean($source));
|
$this->assertEquals($target, Rhymix\Framework\Filters\HTMLFilter::clean($source));
|
||||||
|
|
||||||
|
$source = '<div contenteditable="true"><div contenteditable="false"><p contenteditable="false"></p></div></div>';
|
||||||
|
$target = '<div><div contenteditable="false"><p></p></div></div>';
|
||||||
|
$this->assertEquals($target, Rhymix\Framework\Filters\HTMLFilter::clean($source));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testHTMLFilterCSS3()
|
public function testHTMLFilterCSS3()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue