Method: CGI::Escape#escapeHTML

Defined in:
escape/escape.c

#escapeHTML(string) ⇒ String

Returns HTML-escaped string.

Returns:

  • (String)


304
305
306
307
308
309
310
311
312
313
314
315
# File 'escape/escape.c', line 304

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);
    }
}