diff --git a/app/Util/HtmlDescriptionFilter.php b/app/Util/HtmlDescriptionFilter.php index 7287586d1..cb091b869 100644 --- a/app/Util/HtmlDescriptionFilter.php +++ b/app/Util/HtmlDescriptionFilter.php @@ -20,7 +20,7 @@ class HtmlDescriptionFilter */ protected static array $allowedAttrsByElements = [ 'p' => [], - 'a' => ['href', 'title'], + 'a' => ['href', 'title', 'target'], 'ol' => [], 'ul' => [], 'li' => [], diff --git a/resources/js/wysiwyg/config.js b/resources/js/wysiwyg/config.js index e5a780d18..1666aa500 100644 --- a/resources/js/wysiwyg/config.js +++ b/resources/js/wysiwyg/config.js @@ -348,7 +348,7 @@ export function buildForInput(options) { toolbar: 'bold italic link bullist numlist', content_style: getContentStyle(options), file_picker_types: 'file', - valid_elements: 'p,a[href|title],ol,ul,li,strong,em,br', + valid_elements: 'p,a[href|title|target],ol,ul,li,strong,em,br', file_picker_callback: filePickerCallback, init_instance_callback(editor) { addCustomHeadContent(editor.getDoc()); diff --git a/tests/Entity/BookTest.php b/tests/Entity/BookTest.php index 04dff293f..51bf65d10 100644 --- a/tests/Entity/BookTest.php +++ b/tests/Entity/BookTest.php @@ -266,8 +266,8 @@ class BookTest extends TestCase { $book = $this->entities->book(); - $input = '
Contenta
Contenta
'; + $input = 'Contenta
Contenta
'; $this->asEditor()->put($book->getUrl(), [ 'name' => $book->name,