Module: CGI::Escape

Defined in:
escape/escape.c

Instance Method Summary collapse

Instance Method Details

#escapeHTML(string) ⇒ String

Returns HTML-escaped string.

Returns:

  • (String)


83
84
85
86
87
88
89
90
91
92
93
94
# File 'escape/escape.c', line 83

static VALUE
cgiesc_escape_html(VALUE self, VALUE str)
{
    StringValue(str);

    if (rb_enc_str_asciicompat_p(str)) {
	return optimized_escape_html(str);
    }
    else {
	return rb_call_super(1, &str);
    }
}