module ERB::Escape - erb: Ruby Standard Library Documentation

# module ERB::Escape

### Public Class Methods

html_escape(p1) click to toggle source

    static VALUE
    erb_escape_html(VALUE self, VALUE str)
    {
        if (!RB_TYPE_P(str, T_STRING)) {
            str = rb_convert_type(str, T_STRING, "String", "to_s");
        }

        if (rb_enc_str_asciicompat_p(str)) {
            return optimized_escape_html(str);
        }
        else {
            return rb_funcall(rb_cCGI, id_escapeHTML, 1, str);
        }
    }