instance method
CGI::EscapeExt#escape
CGI.escape(string) → string
ext/cgi/escape/escape.c
View on GitHub ↗
static VALUE
cgiesc_escape(VALUE self, VALUE str)
{
StringValue(str);
if (rb_enc_str_asciicompat_p(str)) {
return optimized_escape(str, 1);
}
else {
return rb_call_super(1, &str);
}
}
Returns URL-escaped string (application/x-www-form-urlencoded).