loofah 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of loofah might be problematic. Click here for more details.
- data.tar.gz.sig +0 -0
- data/CHANGELOG.rdoc +6 -0
- data/Manifest.txt +2 -0
- data/lib/loofah.rb +1 -1
- data/lib/loofah/xml/document.rb +19 -0
- data/lib/loofah/xml/document_fragment.rb +30 -0
- metadata +4 -2
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.rdoc
CHANGED
data/Manifest.txt
CHANGED
@@ -20,6 +20,8 @@ lib/loofah/html5/whitelist.rb
|
|
20
20
|
lib/loofah/instance_methods.rb
|
21
21
|
lib/loofah/scrubber.rb
|
22
22
|
lib/loofah/scrubbers.rb
|
23
|
+
lib/loofah/xml/document.rb
|
24
|
+
lib/loofah/xml/document_fragment.rb
|
23
25
|
lib/loofah/xss_foliate.rb
|
24
26
|
test/helper.rb
|
25
27
|
test/html5/test_sanitizer.rb
|
data/lib/loofah.rb
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
module Loofah
|
2
|
+
module XML # :nodoc:
|
3
|
+
#
|
4
|
+
# Subclass of Nokogiri::XML::Document.
|
5
|
+
#
|
6
|
+
# See Loofah::InstanceMethods for additional methods.
|
7
|
+
#
|
8
|
+
class Document < Nokogiri::XML::Document
|
9
|
+
include Loofah::InstanceMethods
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def sanitize_roots # :nodoc:
|
14
|
+
self
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Loofah
|
2
|
+
module XML # :nodoc:
|
3
|
+
#
|
4
|
+
# Subclass of Nokogiri::XML::DocumentFragment. Also includes Loofah::ScrubberInstanceMethods.
|
5
|
+
#
|
6
|
+
# See Loofah::InstanceMethods for additional methods.
|
7
|
+
#
|
8
|
+
class DocumentFragment < Nokogiri::XML::DocumentFragment
|
9
|
+
include Loofah::InstanceMethods
|
10
|
+
|
11
|
+
class << self
|
12
|
+
#
|
13
|
+
# Overridden Nokogiri::XML::DocumentFragment
|
14
|
+
# constructor. Applications should use Loofah.fragment to
|
15
|
+
# parse a fragment.
|
16
|
+
#
|
17
|
+
def parse tags
|
18
|
+
self.new(Loofah::XML::Document.new, tags)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def sanitize_roots # :nodoc:
|
25
|
+
self
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loofah
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Dalessio
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
FlqnTjy13J3nD30uxy9a1g==
|
32
32
|
-----END CERTIFICATE-----
|
33
33
|
|
34
|
-
date: 2009-11-
|
34
|
+
date: 2009-11-23 00:00:00 -05:00
|
35
35
|
default_executable:
|
36
36
|
dependencies:
|
37
37
|
- !ruby/object:Gem::Dependency
|
@@ -130,6 +130,8 @@ files:
|
|
130
130
|
- lib/loofah/instance_methods.rb
|
131
131
|
- lib/loofah/scrubber.rb
|
132
132
|
- lib/loofah/scrubbers.rb
|
133
|
+
- lib/loofah/xml/document.rb
|
134
|
+
- lib/loofah/xml/document_fragment.rb
|
133
135
|
- lib/loofah/xss_foliate.rb
|
134
136
|
- test/helper.rb
|
135
137
|
- test/html5/test_sanitizer.rb
|
metadata.gz.sig
CHANGED
Binary file
|