]> BookStack Code Mirror - bookstack/commitdiff
Decode HTML entities 2257/head
authorVinnie Okada <redacted>
Fri, 18 Sep 2020 12:54:30 +0000 (06:54 -0600)
committerVinnie Okada <redacted>
Fri, 18 Sep 2020 12:54:30 +0000 (06:54 -0600)
Decode HTML entities in page text before saving it to the database.

app/Entities/Managers/PageContent.php

index 36bc2445c33caeb015b7cf6acd847d8fe6eb0fa0..96399f91f3aa23289a17ffeaed6fd539a4263df1 100644 (file)
@@ -25,7 +25,7 @@ class PageContent
     public function setNewHTML(string $html)
     {
         $this->page->html = $this->formatHtml($html);
-        $this->page->text = $this->toPlainText();
+        $this->page->text = html_entity_decode($this->toPlainText());
     }
 
     /**