class ViewComponent::Base
def maybe_escape_html(text)
def maybe_escape_html(text) return text if request && !request.format.html? return text if text.blank? if text.html_safe? text else yield html_escape(text) end end
def maybe_escape_html(text) return text if request && !request.format.html? return text if text.blank? if text.html_safe? text else yield html_escape(text) end end