app/presenters/concerns/decidim/plans/rich_presenter.rb in decidim-plans-0.16.5 vs app/presenters/concerns/decidim/plans/rich_presenter.rb in decidim-plans-0.16.6
- old
+ new
@@ -4,11 +4,21 @@
module Plans
module RichPresenter
extend ActiveSupport::Concern
include ActionView::Helpers::TextHelper
+ def plain_content(content)
+ sanitize(content, tags: [])
+ end
+
def rich_content(content)
- simple_format(content, wrapper_tag: nil)
+ simple_format(sanitize(content, tags: allowed_rich_tags), wrapper_tag: nil)
+ end
+
+ protected
+
+ def allowed_rich_tags
+ %w(strong em b i)
end
end
end
end