Ruby
2.4.2p198(2017-09-14revision59899)
|
Go to the source code of this file.
Macros | |
#define | lower_hexdigits (ruby_hexdigits+0) |
#define | upper_hexdigits (ruby_hexdigits+16) |
#define | char_to_number(c) ruby_digit36_to_number_table[(unsigned char)(c)] |
#define | MATCH(s) |
Functions | |
RUBY_EXTERN unsigned long | ruby_scan_digits (const char *str, ssize_t len, int base, size_t *retlen, int *overflow) |
static void | html_escaped_cat (VALUE str, char c) |
static void | preserve_original_state (VALUE orig, VALUE dest) |
static VALUE | optimized_escape_html (VALUE str) |
static VALUE | optimized_unescape_html (VALUE str) |
static unsigned char | url_unreserved_char (unsigned char c) |
static VALUE | optimized_escape (VALUE str) |
static VALUE | optimized_unescape (VALUE str, VALUE encoding) |
static VALUE | cgiesc_escape_html (VALUE self, VALUE str) |
static VALUE | cgiesc_unescape_html (VALUE self, VALUE str) |
static VALUE | cgiesc_escape (VALUE self, VALUE str) |
static VALUE | accept_charset (int argc, VALUE *argv, VALUE self) |
static VALUE | cgiesc_unescape (int argc, VALUE *argv, VALUE self) |
void | Init_escape (void) |
void | InitVM_escape (void) |
Variables | |
RUBY_EXTERN const char | ruby_hexdigits [] |
RUBY_EXTERN const signed char | ruby_digit36_to_number_table [] |
static VALUE | rb_cCGI |
static VALUE | rb_mUtil |
static VALUE | rb_mEscape |
static ID | id_accept_charset |
#define char_to_number | ( | c | ) | ruby_digit36_to_number_table[(unsigned char)(c)] |
Definition at line 9 of file escape.c.
Referenced by optimized_unescape().
#define lower_hexdigits (ruby_hexdigits+0) |
#define MATCH | ( | s | ) |
Referenced by obj_type(), optimized_unescape_html(), and vm_init_redefined_flag().
#define upper_hexdigits (ruby_hexdigits+16) |
Definition at line 8 of file escape.c.
Referenced by optimized_escape().
Definition at line 373 of file escape.c.
References CLASS_OF, id_accept_charset, and rb_cvar_get().
Referenced by cgiesc_unescape().
Definition at line 360 of file escape.c.
References optimized_escape(), rb_call_super(), rb_enc_str_asciicompat_p, and StringValue.
Referenced by InitVM_escape().
Definition at line 320 of file escape.c.
References optimized_escape_html(), rb_call_super(), rb_enc_str_asciicompat_p, and StringValue.
Referenced by InitVM_escape().
Definition at line 388 of file escape.c.
References accept_charset(), optimized_unescape(), rb_call_super(), rb_check_arity, rb_enc_str_asciicompat_p, and StringValue.
Referenced by InitVM_escape().
Definition at line 340 of file escape.c.
References optimized_unescape_html(), rb_call_super(), rb_enc_str_asciicompat_p, and StringValue.
Referenced by InitVM_escape().
|
static |
Definition at line 15 of file escape.c.
References rb_str_cat_cstr().
Referenced by optimized_escape_html().
void Init_escape | ( | void | ) |
Definition at line 404 of file escape.c.
References id_accept_charset, InitVM, and rb_intern_const.
void InitVM_escape | ( | void | ) |
Definition at line 411 of file escape.c.
References cgiesc_escape(), cgiesc_escape_html(), cgiesc_unescape(), cgiesc_unescape_html(), rb_cCGI, rb_cObject, rb_define_class(), rb_define_method(), rb_define_module_under(), rb_extend_object(), rb_mEscape, rb_mUtil, and rb_prepend_module().
Definition at line 208 of file escape.c.
References buf, len, preserve_original_state(), rb_str_buf_new(), rb_str_cat(), rb_str_cat_cstr(), rb_str_dup(), RSTRING_LEN, RSTRING_PTR, upper_hexdigits, and url_unreserved_char().
Referenced by cgiesc_escape().
Definition at line 45 of file escape.c.
References html_escaped_cat(), len, preserve_original_state(), rb_str_buf_new(), rb_str_cat(), rb_str_dup(), RSTRING_LEN, and RSTRING_PTR.
Referenced by cgiesc_escape_html().
Definition at line 250 of file escape.c.
References buf, char_to_number, ENC_CODERANGE, ENC_CODERANGE_CLEAN_P, ENC_CODERANGE_SET, ENC_CODERANGE_UNKNOWN, ISXDIGIT, len, preserve_original_state(), rb_enc_associate_index(), rb_enc_get_index(), rb_enc_str_coderange(), rb_enc_to_index(), rb_str_buf_new(), rb_str_cat(), rb_str_dup(), rb_to_encoding(), RSTRING_LEN, and RSTRING_PTR.
Referenced by cgiesc_unescape().
Definition at line 84 of file escape.c.
References buf, ISDIGIT, ISXDIGIT, len, MATCH, preserve_original_state(), rb_enc_get(), rb_enc_mbcput, rb_enc_name, rb_str_buf_new(), rb_str_cat(), rb_str_dup(), RSTRING_LEN, RSTRING_PTR, ruby_scan_digits(), strcasecmp, and UNICODE_MAX.
Referenced by cgiesc_unescape_html().
Definition at line 37 of file escape.c.
References rb_enc_associate(), rb_enc_get(), and RB_OBJ_INFECT_RAW.
Referenced by optimized_escape(), optimized_escape_html(), optimized_unescape(), and optimized_unescape_html().
RUBY_EXTERN unsigned long ruby_scan_digits | ( | const char * | str, |
ssize_t | len, | ||
int | base, | ||
size_t * | retlen, | ||
int * | overflow | ||
) |
Definition at line 84 of file util.c.
Referenced by optimized_unescape_html(), parse_numvar(), rb_cstr_parse_inum(), and rb_strftime_with_timespec().
|
static |
Definition at line 189 of file escape.c.
Referenced by optimized_escape().
|
static |
Definition at line 12 of file escape.c.
Referenced by accept_charset(), and Init_escape().
|
static |
Definition at line 11 of file escape.c.
Referenced by InitVM_escape().
|
static |
Definition at line 11 of file escape.c.
Referenced by InitVM_escape().
|
static |
Definition at line 11 of file escape.c.
Referenced by InitVM_escape().
RUBY_EXTERN const signed char ruby_digit36_to_number_table[] |
RUBY_EXTERN const char ruby_hexdigits[] |