diff --git a/tests/Editor/SetContentTest.php b/tests/Editor/SetContentTest.php index f0a80de03..34a13b4a6 100644 --- a/tests/Editor/SetContentTest.php +++ b/tests/Editor/SetContentTest.php @@ -109,3 +109,17 @@ ], ]); }); + +test('link from html without target or rel should not have them in output', function () { + $html = 'Example Link'; + + $result = (new Editor([ + 'extensions' => [ + new \Tiptap\Extensions\StarterKit, + new \Tiptap\Marks\Link, + ], + ]))->setContent($html)->getHTML(); + + expect($result)->not->toContain('target="_blank"'); + expect($result)->not->toContain('rel='); +});