loofah 2.21.0 → 2.21.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/README.md +5 -1
- data/lib/loofah/version.rb +1 -1
- data/lib/loofah.rb +10 -13
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '00569b28a0bc6307a0a8eb8704ad374f10269008dada5d09470c1a2a87da0a6f'
|
4
|
+
data.tar.gz: eff12a44f1152dc377ac0a6859be97f85b5a0a031a0b7688387c73f7130351d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbcf412c0105203fe3d9ee057dc146cc7f8e9f29587c0f97b9c03a5206eacd31f7170042c74050d40093875b8109f524434a0960ef9305269fdda536e3049e3b
|
7
|
+
data.tar.gz: 48c3f2c0f4a0b2316c46ad1826c61ded9c3438ace28c477d7b67cc345847a00bb5747bab5b22cf5d774e82c90bedd085a9878c40609f93abda49f6aa01257f7c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 2.21.3 / 2023-05-15
|
4
|
+
|
5
|
+
* Quash "instance variable not initialized" warning in Ruby < 3.0. [[#268](https://github.com/flavorjones/loofah/issues/268)] (Thanks, [@dharamgollapudi](https://github.com/dharamgollapudi)!)
|
6
|
+
|
7
|
+
|
8
|
+
## 2.21.2 / 2023-05-11
|
9
|
+
|
10
|
+
### Dependencies
|
11
|
+
|
12
|
+
* Update the dependency on Nokogiri to be `>= 1.12.0`. The dependency in 2.21.0 and 2.21.1 was left at `>= 1.5.9` but versions before 1.12 would result in a `NameError` exception. [[#266](https://github.com/flavorjones/loofah/issues/266)]
|
13
|
+
|
14
|
+
|
15
|
+
## 2.21.1 / 2023-05-10
|
16
|
+
|
17
|
+
### Fixed
|
18
|
+
|
19
|
+
* Don't define `HTML5::Document` and `HTML5::DocumentFragment` when Nokogiri is `< 1.14`. In 2.21.0 these classes were defined whenever `Nokogiri::HTML5` was defined, but Nokogiri v1.12 and v1.13 do not support Loofah subclassing properly.
|
20
|
+
|
21
|
+
|
3
22
|
## 2.21.0 / 2023-05-10
|
4
23
|
|
5
24
|
### HTML5 Support
|
data/README.md
CHANGED
data/lib/loofah/version.rb
CHANGED
data/lib/loofah.rb
CHANGED
@@ -7,14 +7,11 @@ module Loofah
|
|
7
7
|
def html5_support?
|
8
8
|
# Note that Loofah can only support HTML5 in Nokogiri >= 1.14.0 because it requires the
|
9
9
|
# subclassing fix from https://github.com/sparklemotion/nokogiri/pull/2534
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
@html5_support_set = true
|
16
|
-
end
|
17
|
-
@html5_support
|
10
|
+
return @html5_support if defined? @html5_support
|
11
|
+
|
12
|
+
@html5_support =
|
13
|
+
Gem::Version.new(Nokogiri::VERSION) > Gem::Version.new("1.14.0") &&
|
14
|
+
Nokogiri.uses_gumbo?
|
18
15
|
end
|
19
16
|
end
|
20
17
|
end
|
@@ -36,7 +33,7 @@ require_relative "loofah/xml/document_fragment"
|
|
36
33
|
require_relative "loofah/html4/document"
|
37
34
|
require_relative "loofah/html4/document_fragment"
|
38
35
|
|
39
|
-
if
|
36
|
+
if Loofah.html5_support?
|
40
37
|
require_relative "loofah/html5/document"
|
41
38
|
require_relative "loofah/html5/document_fragment"
|
42
39
|
end
|
@@ -123,19 +120,19 @@ module Loofah
|
|
123
120
|
end
|
124
121
|
else
|
125
122
|
def html5_document(*args, &block)
|
126
|
-
raise NotImplementedError, "HTML5 is not supported by your version of Nokogiri"
|
123
|
+
raise NotImplementedError, "Loofah::HTML5 is not supported by your version of Nokogiri"
|
127
124
|
end
|
128
125
|
|
129
126
|
def html5_fragment(*args, &block)
|
130
|
-
raise NotImplementedError, "HTML5 is not supported by your version of Nokogiri"
|
127
|
+
raise NotImplementedError, "Loofah::HTML5 is not supported by your version of Nokogiri"
|
131
128
|
end
|
132
129
|
|
133
130
|
def scrub_html5_document(string_or_io, method)
|
134
|
-
raise NotImplementedError, "HTML5 is not supported by your version of Nokogiri"
|
131
|
+
raise NotImplementedError, "Loofah::HTML5 is not supported by your version of Nokogiri"
|
135
132
|
end
|
136
133
|
|
137
134
|
def scrub_html5_fragment(string_or_io, method)
|
138
|
-
raise NotImplementedError, "HTML5 is not supported by your version of Nokogiri"
|
135
|
+
raise NotImplementedError, "Loofah::HTML5 is not supported by your version of Nokogiri"
|
139
136
|
end
|
140
137
|
end
|
141
138
|
|
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: 2.21.
|
4
|
+
version: 2.21.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Dalessio
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-05-
|
12
|
+
date: 2023-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: crass
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 1.
|
34
|
+
version: 1.12.0
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 1.
|
41
|
+
version: 1.12.0
|
42
42
|
description: |
|
43
43
|
Loofah is a general library for manipulating and transforming HTML/XML documents and fragments,
|
44
44
|
built on top of Nokogiri.
|
@@ -90,7 +90,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
90
90
|
requirements:
|
91
91
|
- - ">="
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version:
|
93
|
+
version: 2.5.0
|
94
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
96
|
- - ">="
|