Method: CGI::Escape#unescape
- Defined in:
- escape/escape.c
#unescape(string, encoding = @@accept_charset) ⇒ String
Returns URL-unescaped string (application/x-www-form-urlencoded).
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 |
# File 'escape/escape.c', line 401
static VALUE
cgiesc_unescape(int argc, VALUE *argv, VALUE self)
{
VALUE str = (rb_check_arity(argc, 1, 2), argv[0]);
StringValue(str);
if (rb_enc_str_asciicompat_p(str)) {
VALUE enc = accept_charset(argc-1, argv+1, self);
return optimized_unescape(str, enc, 1);
}
else {
return rb_call_super(argc, argv);
}
}
|