From: Dan Brown Date: Wed, 27 Oct 2021 11:29:01 +0000 (+0100) Subject: Added test to cover #3010 X-Git-Tag: v21.10.1^2~1 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/3166541002069cd3252b8e7a79c8d3f88c1d0a6c Added test to cover #3010 --- diff --git a/tests/Entity/PageContentTest.php b/tests/Entity/PageContentTest.php index ca2a24131..47a3c9c13 100644 --- a/tests/Entity/PageContentTest.php +++ b/tests/Entity/PageContentTest.php @@ -608,6 +608,21 @@ class PageContentTest extends TestCase $this->assertStringContainsString('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' => '

test

', + ]); + + $page->refresh(); + $this->assertStringContainsString('html); + } + public function test_base64_images_get_extracted_from_markdown_page_content() { $this->asEditor();