sanitizer 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -99,7 +99,7 @@ module Sanitizer
99
99
  # Convert invalid chars to HTML Entries
100
100
  def html_decode(text)
101
101
  text = text.to_s
102
- @@htmle.decode(text, :named)
102
+ @@htmle.decode(text)
103
103
  end
104
104
  end # self
105
105
  end
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Sanitizer
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
@@ -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: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
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-06-29 00:00:00 -03:00
18
+ date: 2011-07-12 00:00:00 -03:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency