output_safety.rb 207 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
# frozen_string_literal: true

module Banzai
  module Filter
    module OutputSafety
      def escape_once(html)
        html.html_safe? ? html : ERB::Util.html_escape_once(html)
      end
    end
  end
end