escape_utils 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/ext/escape_utils/escape_utils.c +4 -4
- data/lib/escape_utils/version.rb +1 -1
- metadata +4 -5
- data/VERSION +0 -1
data/CHANGELOG.md
CHANGED
@@ -233,6 +233,7 @@ static size_t unescape_url(unsigned char *out, const unsigned char *in, size_t i
|
|
233
233
|
if (IS_HEX(*in) && IS_HEX(*(in+1))) {
|
234
234
|
*out++ = (UNHEX(*in) << 4) + UNHEX(*(in+1));
|
235
235
|
in+=2;
|
236
|
+
len-=2;
|
236
237
|
total-=2;
|
237
238
|
} else {
|
238
239
|
/* incomplete escape, pass it through */
|
@@ -283,6 +284,7 @@ static size_t unescape_uri(unsigned char *out, const unsigned char *in, size_t i
|
|
283
284
|
if (IS_HEX(*in) && IS_HEX(*(in+1))) {
|
284
285
|
*out++ = (UNHEX(*in) << 4) + UNHEX(*(in+1));
|
285
286
|
in+=2;
|
287
|
+
len-=2;
|
286
288
|
total-=2;
|
287
289
|
} else {
|
288
290
|
/* incomplete escape, pass it through */
|
@@ -622,13 +624,11 @@ static VALUE rb_unescape_uri(VALUE self, VALUE str) {
|
|
622
624
|
return rb_output_buf;
|
623
625
|
}
|
624
626
|
|
625
|
-
static VALUE rb_s_get_html_secure(VALUE self)
|
626
|
-
{
|
627
|
+
static VALUE rb_s_get_html_secure(VALUE self) {
|
627
628
|
return rb_cvar_get(self, rb_html_secure);
|
628
629
|
}
|
629
630
|
|
630
|
-
static VALUE rb_s_set_html_secure(VALUE self, VALUE val)
|
631
|
-
{
|
631
|
+
static VALUE rb_s_set_html_secure(VALUE self, VALUE val) {
|
632
632
|
html_secure = RTEST(val);
|
633
633
|
rb_cvar_set(self, rb_html_secure, val);
|
634
634
|
|
data/lib/escape_utils/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: escape_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brian Lopez
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-02-
|
18
|
+
date: 2011-02-21 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -136,7 +136,6 @@ files:
|
|
136
136
|
- MIT-LICENSE
|
137
137
|
- README.rdoc
|
138
138
|
- Rakefile
|
139
|
-
- VERSION
|
140
139
|
- benchmark/html_escape.rb
|
141
140
|
- benchmark/html_unescape.rb
|
142
141
|
- benchmark/javascript_escape.rb
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.1.9
|