]> BookStack Code Mirror - bookstack/blobdiff - tests/Entity/PageContentTest.php
Fix "Ubunto Mono" $mono type misspelling
[bookstack] / tests / Entity / PageContentTest.php
index d714c3229db7a8dfeecd587c67b0d9f41cde4457..d3b6224c4192b653586c55644154c0d4f62f8074 100644 (file)
@@ -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' => '<p>&quot;Hello &amp; welcome&quot;</p>',
+            ]);
+
+        $page->refresh();
+        $this->assertEquals('"Hello & welcome"', $page->text);
+    }
 }