From 39ebecace66ce36f4a896fefb86814dde042577f Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sun, 2 Aug 2026 14:32:02 +0200 Subject: Test that aggregate? keeps the attributes the editor permits --- test/models/helpers/content_helper_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/models/helpers/content_helper_test.rb b/test/models/helpers/content_helper_test.rb index c69ef4ed..40803633 100644 --- a/test/models/helpers/content_helper_test.rb +++ b/test/models/helpers/content_helper_test.rb @@ -125,4 +125,16 @@ class ContentHelperTest < ActionView::TestCase assert_match "Document A", result assert_match "Document B", result end + + test "aggregate? keeps the anchor attributes the editor is allowed to author" do + html = %(

x

) + + out = aggregate?(html) + + assert_includes out, 'target="_blank"' + assert_includes out, 'rel="noopener"' + assert_includes out, 'title="Beispiel"' + assert_includes out, 'data-gallery="g1"' + end end -- cgit v1.3