Module: ERB::Escape

Included in:
Util
Defined in:
lib/erb/util.rb,
ext/erb/escape/escape.c

Class Method Summary collapse

Class Method Details

.html_escape(str) ⇒ Object

ERB::Util.html_escape does not allocate a new string when nothing needs to be escaped



71
72
73
# File 'ext/erb/escape/escape.c', line 71

def html_escape(s)
  CGI.escapeHTML(s.to_s)
end