instance method
html_escape
Ruby on Rails 7.0.10
Since v2.2.3 Last seen in v7.0.10 PrivateSignature
html_escape(s)
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 > 0 & a < 10?
Parameters
-
sreq
Source
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 27
def html_escape(s)
unwrapped_html_escape(s).html_safe
end
Defined in activesupport/lib/active_support/core_ext/string/output_safety.rb line 27
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ERB::Util