module ActiveSupport::CoreExt::ERBUtil

Private Instance Methods

h(s)
Alias for: html_escape
html_escape(s) click to toggle source

A utility method for escaping HTML tag characters. This method is also aliased as h.

puts html_escape('is a > 0 & a < 10?')
# => is a &gt; 0 &amp; a &lt; 10?
# File lib/active_support/core_ext/erb/util.rb, line 25
def html_escape(s) # rubocop:disable Lint/DuplicateMethods
  unwrapped_html_escape(s).html_safe
end
Also aliased as: h