diff options
Diffstat (limited to 'actiontext/app/helpers')
-rw-r--r-- | actiontext/app/helpers/action_text/content_helper.rb | 2 | ||||
-rw-r--r-- | actiontext/app/helpers/action_text/tag_helper.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/actiontext/app/helpers/action_text/content_helper.rb b/actiontext/app/helpers/action_text/content_helper.rb index ed2887d865..1e05f572f7 100644 --- a/actiontext/app/helpers/action_text/content_helper.rb +++ b/actiontext/app/helpers/action_text/content_helper.rb @@ -4,7 +4,7 @@ require "rails-html-sanitizer" module ActionText module ContentHelper - mattr_accessor(:sanitizer) { Rails::Html::Sanitizer.white_list_sanitizer.new } + mattr_accessor(:sanitizer) { Rails::Html::Sanitizer.safe_list_sanitizer.new } mattr_accessor(:allowed_tags) { sanitizer.class.allowed_tags + [ ActionText::Attachment::TAG_NAME, "figure", "figcaption" ] } mattr_accessor(:allowed_attributes) { sanitizer.class.allowed_attributes + ActionText::Attachment::ATTRIBUTES } mattr_accessor(:scrubber) diff --git a/actiontext/app/helpers/action_text/tag_helper.rb b/actiontext/app/helpers/action_text/tag_helper.rb index 1dc6202ae1..fe40be74f5 100644 --- a/actiontext/app/helpers/action_text/tag_helper.rb +++ b/actiontext/app/helpers/action_text/tag_helper.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true +require "active_support/core_ext/object/try" require "action_view/helpers/tags/placeholderable" module ActionText |