diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9503392804..6189b9d533 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -135,7 +135,7 @@ def markdown_unsafe(source) def sanitize(html) @tags ||= Rails::Html::SafeListSanitizer.allowed_tags.to_a + %w[table thead tbody tr td th colgroup col style summary details img] + - %w[svg g style circle line rect path polygon polyline text defs] + %w[svg g style circle line rect path polygon polyline text defs use] @attributes ||= Rails::Html::SafeListSanitizer.allowed_attributes.to_a + %w[style target data-bs-toggle data-parent data-tab data-line data-element id] + %w[viewBox width height version style class transform id x y rx ry x1 y1 x2 y2 d points fill stroke stroke-width stroke-dasharray cx cy r font-size font-family font-weight font-variant textLength writing-mode glyph-orientation-vertical text-orientation color] diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index f86708abac..cafce93640 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -74,6 +74,9 @@ class ApplicationHelperTest < ActiveSupport::TestCase + + +

Hello HTML @@ -81,7 +84,7 @@ class ApplicationHelperTest < ActiveSupport::TestCase assert_no_match(/