sanitizer 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sanitizer/sanitizer.rb +1 -1
- data/lib/sanitizer/version.rb +1 -1
- data/spec/sanitizer_spec.rb +10 -0
- metadata +4 -4
data/lib/sanitizer/sanitizer.rb
CHANGED
data/lib/sanitizer/version.rb
CHANGED
data/spec/sanitizer_spec.rb
CHANGED
@@ -65,6 +65,16 @@ describe Sanitizer do
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
+
describe "html_decode" do
|
69
|
+
|
70
|
+
it "should convert html entries to chars" do
|
71
|
+
text = "Eu & Tu"
|
72
|
+
output = Sanitizer.html_decode(text)
|
73
|
+
output.should == "Eu & Tu"
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
77
|
+
|
68
78
|
describe "strip_tags" do
|
69
79
|
it "should remove only <b> tags" do
|
70
80
|
html = "<p>Oi <b>como</b> <a href='/xxx/'>Vai</a></p><!-- s -->"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sanitizer
|
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
|
- Marcelo Eden
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-07-12 00:00:00 -03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|