mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 16:22:41 +09:00
Fix #741 do not allow empty HTML content in document and comment
This commit is contained in:
parent
29f2f6a47f
commit
387dd1f78b
6 changed files with 49 additions and 0 deletions
|
|
@ -159,4 +159,16 @@ class FunctionsTest extends \Codeception\TestCase\Test
|
|||
$this->assertEquals("Trimmed", utf8_trim("\x20\xe2\x80\x80Trimmed\xe2\x80\x84\xe2\x80\x86\xe2\x80\x8b"));
|
||||
$this->assertEquals("Trimmed", utf8_trim("\x20\xe2\x80\x80Trimmed\x0a\x0c\x07\x09"));
|
||||
}
|
||||
|
||||
public function testIsEmptyHTMLContent()
|
||||
{
|
||||
$this->assertTrue(is_empty_html_content('<p> <br><br></p>'));
|
||||
$this->assertTrue(is_empty_html_content('<p> </p>' . "\n\n" . '<p><span> </span></p>'));
|
||||
$this->assertTrue(is_empty_html_content('<p>  ​ ‍</p>'));
|
||||
$this->assertFalse(is_empty_html_content('<p> </p>' . "\n\n" . '<p>Hello world</p>'));
|
||||
$this->assertFalse(is_empty_html_content('<p><img src="foobar.jpg"></p>'));
|
||||
$this->assertFalse(is_empty_html_content('<p><iframe src="http://www.youtube.com/" /></p>'));
|
||||
$this->assertFalse(is_empty_html_content('<p><video src="rickroll.webm" /></p>'));
|
||||
$this->assertFalse(is_empty_html_content('<p><object></object></p>'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue