Browse Source

allow ul/li/ol

pull/39/head
Aaron Parecki 5 years ago
parent
commit
d7672df96c
3 changed files with 11 additions and 0 deletions
  1. +3
    -0
      lib/Formats/Mf2.php
  2. +2
    -0
      tests/SanitizeTest.php
  3. +6
    -0
      tests/data/sanitize.example/entry-with-valid-tags

+ 3
- 0
lib/Formats/Mf2.php View File

@ -317,6 +317,9 @@ class Mf2 {
'h4',
'h5',
'h6',
'ul',
'li',
'ol'
]);
$def = $config->getHTMLDefinition(true);
$def->addElement(

+ 2
- 0
tests/SanitizeTest.php View File

@ -50,6 +50,8 @@ class SanitizeTest extends PHPUnit_Framework_TestCase {
$this->assertContains('<h4>Four</h4>', $html, '<h4> missing');
$this->assertContains('<h5>Five</h5>', $html, '<h5> missing');
$this->assertContains('<h6>Six</h6>', $html, '<h6> missing');
$this->assertContains('<ul>', $html, '<ul> missing');
$this->assertContains('<li>One</li>', $html, '<li> missing');
}
public function testRemovesUnsafeTags() {

+ 6
- 0
tests/data/sanitize.example/entry-with-valid-tags View File

@ -25,6 +25,12 @@ for code examples and such
<h4>Four</h4>
<h5>Five</h5>
<h6>Six</h6>
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>
</div>
</body>
</html>

Loading…
Cancel
Save