module ActiveSupport::CoreExt::ERBUtil
def html_escape(s) # :nodoc:
This method is not for public consumption! Seriously!
HTML escapes strings but doesn't wrap them with an ActiveSupport::SafeBuffer.
def html_escape(s) # :nodoc: s = s.to_s if s.html_safe? s else super(ActiveSupport::Multibyte::Unicode.tidy_bytes(s)) end end
def html_escape(s) # rubocop:disable Lint/DuplicateMethods
# => is a > 0 & a < 10?
puts html_escape('is a > 0 & a < 10?')
This method is also aliased as h.
A utility method for escaping HTML tag characters.
def html_escape(s) # rubocop:disable Lint/DuplicateMethods unwrapped_html_escape(s).html_safe end