loofah 2.21.0 → 2.21.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b8eaa7f3006e69a9879def4bb63d4ffce0c8ed5ee404032379702d25e7b12c1
4
- data.tar.gz: ed432220263d87db39f150c772e63b39ee30a2c133bf0179fa6f31d43a538ca8
3
+ metadata.gz: fc4c92807e83a1ba62b6b092217150c2784904f3e0ba5c3aff1a4f0415faa739
4
+ data.tar.gz: a1e7028ff5eea1725b46adde2f14b350cae3381e6770c33db14714c380875241
5
5
  SHA512:
6
- metadata.gz: 0cb076b4d791c0c121058b0b7a8f63032b27fcf75f338e98d3ec2e63ad42db21ee0cce87c6bd7381b3d88e7d41d1912002ce949779fa7037732692521ed881ec
7
- data.tar.gz: f90b086a629919f3e01d8535ed735b3c2d918310638895220218b2a88f43f6a023c8d87466aa70311afdc93323227cc1813729643bf88ad77126ca8d3eb7324d
6
+ metadata.gz: 268e899470213cd80a6a7f661a754dd029f217f559006f9a587a7977c7ebcad4b440a7e6c3a476d6e8a26fea27e114541d985413f593b32b020adc93794e81ee
7
+ data.tar.gz: b59bcf306343775afa03d313534801e9259db2462acbfd7f52f7e91b7b98657c51ba78fa0f7a2dcaa6c24167da4e6e93803e63622228e74bab1ec98813c24cad
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.21.1 / 2023-05-10
4
+
5
+ ### Fixed
6
+
7
+ * 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.
8
+
9
+
3
10
  ## 2.21.0 / 2023-05-10
4
11
 
5
12
  ### HTML5 Support
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Loofah
4
4
  # The version of Loofah you are using
5
- VERSION = "2.21.0"
5
+ VERSION = "2.21.1"
6
6
  end
data/lib/loofah.rb CHANGED
@@ -36,7 +36,7 @@ require_relative "loofah/xml/document_fragment"
36
36
  require_relative "loofah/html4/document"
37
37
  require_relative "loofah/html4/document_fragment"
38
38
 
39
- if Nokogiri.respond_to?(:uses_gumbo?) && Nokogiri.uses_gumbo?
39
+ if Loofah.html5_support?
40
40
  require_relative "loofah/html5/document"
41
41
  require_relative "loofah/html5/document_fragment"
42
42
  end
@@ -123,19 +123,19 @@ module Loofah
123
123
  end
124
124
  else
125
125
  def html5_document(*args, &block)
126
- raise NotImplementedError, "HTML5 is not supported by your version of Nokogiri"
126
+ raise NotImplementedError, "Loofah::HTML5 is not supported by your version of Nokogiri"
127
127
  end
128
128
 
129
129
  def html5_fragment(*args, &block)
130
- raise NotImplementedError, "HTML5 is not supported by your version of Nokogiri"
130
+ raise NotImplementedError, "Loofah::HTML5 is not supported by your version of Nokogiri"
131
131
  end
132
132
 
133
133
  def scrub_html5_document(string_or_io, method)
134
- raise NotImplementedError, "HTML5 is not supported by your version of Nokogiri"
134
+ raise NotImplementedError, "Loofah::HTML5 is not supported by your version of Nokogiri"
135
135
  end
136
136
 
137
137
  def scrub_html5_fragment(string_or_io, method)
138
- raise NotImplementedError, "HTML5 is not supported by your version of Nokogiri"
138
+ raise NotImplementedError, "Loofah::HTML5 is not supported by your version of Nokogiri"
139
139
  end
140
140
  end
141
141
 
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.0
4
+ version: 2.21.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Dalessio