diff --git a/lib/sanitize.rb b/lib/sanitize.rb index 561c180..10b6b10 100644 --- a/lib/sanitize.rb +++ b/lib/sanitize.rb @@ -1,6 +1,6 @@ # encoding: utf-8 -require 'nokogumbo' +require 'nokogiri' require 'set' require_relative 'sanitize/version' diff --git a/sanitize.gemspec b/sanitize.gemspec index 6ba12cf..7c37693 100644 --- a/sanitize.gemspec +++ b/sanitize.gemspec @@ -18,8 +18,7 @@ Gem::Specification.new do |s| # Runtime dependencies. s.add_dependency('crass', '~> 1.0.2') - s.add_dependency('nokogiri', '>= 1.8.0') - s.add_dependency('nokogumbo', '~> 2.0') + s.add_dependency('nokogiri', '>= 1.12.0') # Development dependencies. s.add_development_dependency('minitest', '~> 5.11.3') diff --git a/test/test_sanitize.rb b/test/test_sanitize.rb index ea5e75d..2f7c72d 100644 --- a/test/test_sanitize.rb +++ b/test/test_sanitize.rb @@ -53,9 +53,9 @@ @s.document("a#{sample_non_chars}z").must_equal "az" end - describe 'when html body exceeds Nokogumbo::DEFAULT_MAX_TREE_DEPTH' do + describe 'when html body exceeds Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH' do let(:content) do - content = nest_html_content('foo', Nokogumbo::DEFAULT_MAX_TREE_DEPTH) + content = nest_html_content('foo', Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH) "#{content}" end @@ -115,9 +115,9 @@ @s.fragment("a#{sample_non_chars}z").must_equal "az" end - describe 'when html body exceeds Nokogumbo::DEFAULT_MAX_TREE_DEPTH' do + describe 'when html body exceeds Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH' do let(:content) do - content = nest_html_content('foo', Nokogumbo::DEFAULT_MAX_TREE_DEPTH) + content = nest_html_content('foo', Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH) "#{content}" end