+ when "html" then HTML.new(text || "")
+ when "markdown" then Markdown.new(text || "")
+ when "text" then Text.new(text || "")
+ end
+ end
+
+ class SimpleFormat
+ include ActionView::Helpers::TextHelper
+ include ActionView::Helpers::OutputSafetyHelper
+
+ def sanitize(text, _options = {})
+ Sanitize.clean(text, Sanitize::Config::OSM).html_safe