mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-04-30 14:40:03 +00:00
Added test to cover #3010
This commit is contained in:
parent
b31fbf5ba8
commit
3166541002
1 changed files with 15 additions and 0 deletions
|
@ -608,6 +608,21 @@ class PageContentTest extends TestCase
|
||||||
$this->assertStringContainsString('<img src=""', $page->html);
|
$this->assertStringContainsString('<img src=""', $page->html);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Relevant to https://github.com/BookStackApp/BookStack/issues/3010
|
||||||
|
public function test_base64_images_within_html_blanked_if_extension_incorrect_but_prefix_matches_correct_extension()
|
||||||
|
{
|
||||||
|
$this->asEditor();
|
||||||
|
$page = Page::query()->first();
|
||||||
|
|
||||||
|
$this->put($page->getUrl(), [
|
||||||
|
'name' => $page->name, 'summary' => '',
|
||||||
|
'html' => '<p>test<img src="data:image/pngr;base64,' . $this->base64Jpeg . '"/></p>',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$page->refresh();
|
||||||
|
$this->assertStringContainsString('<img src=""', $page->html);
|
||||||
|
}
|
||||||
|
|
||||||
public function test_base64_images_get_extracted_from_markdown_page_content()
|
public function test_base64_images_get_extracted_from_markdown_page_content()
|
||||||
{
|
{
|
||||||
$this->asEditor();
|
$this->asEditor();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue