1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Input WYSIWYG: Updated tests, Added simple html limiting

This commit is contained in:
Dan Brown
2023-12-19 15:10:29 +00:00
parent 077b9709d4
commit 7fd6d5b2cc
9 changed files with 134 additions and 36 deletions

View File

@ -10,6 +10,7 @@ use BookStack\Exceptions\ImageUploadException;
use BookStack\References\ReferenceStore;
use BookStack\References\ReferenceUpdater;
use BookStack\Uploads\ImageRepo;
use BookStack\Util\HtmlDescriptionFilter;
use Illuminate\Http\UploadedFile;
class BaseRepo
@ -111,7 +112,7 @@ class BaseRepo
/** @var HasHtmlDescription $entity */
if (isset($input['description_html'])) {
$entity->description_html = $input['description_html'];
$entity->description_html = HtmlDescriptionFilter::filterFromString($input['description_html']);
$entity->description = html_entity_decode(strip_tags($input['description_html']));
} else if (isset($input['description'])) {
$entity->description = $input['description'];