debian-mirror-gitlab/lib/banzai/filter/output_safety.rb

12 lines
207 B
Ruby
Raw Normal View History

2019-07-07 11:18:12 +05:30
# 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