From: Dan Brown Date: Sat, 19 Sep 2020 13:58:18 +0000 (+0100) Subject: Added test to check text gen decodes HTML entities X-Git-Tag: v0.30.0~1^2~9 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/2e39e458867b5576ae77cbcec2860390ad74ef87 Added test to check text gen decodes HTML entities --- diff --git a/tests/Entity/PageContentTest.php b/tests/Entity/PageContentTest.php index d714c3229..7aeaf0012 100644 --- a/tests/Entity/PageContentTest.php +++ b/tests/Entity/PageContentTest.php @@ -304,4 +304,18 @@ class PageContentTest extends TestCase 'level' => 3, ], $navMap[2]); } + + public function test_page_text_decodes_html_entities() + { + $page = Page::query()->first(); + + $this->actingAs($this->getAdmin()) + ->put($page->getUrl(''), [ + 'name' => 'Testing', + 'html' => '

Hello & welcome

', + ]); + + $page->refresh(); + $this->assertEquals('Hello & welcome', $page->text); + } }