method

html_escape

v2.0.3 - Show latest stable - Class: ERB::Util
html_escape(s)
public

No documentation available.

# File actionpack/lib/action_view/template_handlers/erb.rb, line 7
    def html_escape(s)
      s.to_s.gsub(/[&"><]/) { |special| HTML_ESCAPE[special] }
    end

1Note

the correct return value of html_escape in example above

allenb ยท Aug 23, 2011

the correct return is:

=> is a > 0 & a < 10?