diff --git a/rails-html-sanitizer-1.4.3.gem b/rails-html-sanitizer-1.4.3.gem
deleted file mode 100644
index ae2042113974c93b502ceaef353d880838634efa..0000000000000000000000000000000000000000
Binary files a/rails-html-sanitizer-1.4.3.gem and /dev/null differ
diff --git a/rails-html-sanitizer-1.6.0.gem b/rails-html-sanitizer-1.6.0.gem
new file mode 100644
index 0000000000000000000000000000000000000000..08054b3e920050b0ec0d8b7d526f4dbbdaf6fd4f
Binary files /dev/null and b/rails-html-sanitizer-1.6.0.gem differ
diff --git a/rubygem-rails-html-sanitizer-1.4.3-tests-libxml2-2_10_0-parsing-comments-change.patch b/rubygem-rails-html-sanitizer-1.4.3-tests-libxml2-2_10_0-parsing-comments-change.patch
deleted file mode 100644
index ab388a6e130bfee1ac70ab3736bb4fe0adce8868..0000000000000000000000000000000000000000
--- a/rubygem-rails-html-sanitizer-1.4.3-tests-libxml2-2_10_0-parsing-comments-change.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 307ecf22162f58af85d7b4fe571e3d5b8bdf44c7 Mon Sep 17 00:00:00 2001
-From: Mike Dalessio
-Date: Wed, 17 Aug 2022 10:54:37 -0400
-Subject: [PATCH] tests: handle libxml 2.10.0 incorrectly-opened comment
- parsing
-
-Related, see:
-
-- https://github.com/sparklemotion/nokogiri/pull/2625
-- https://gitlab.gnome.org/GNOME/libxml2/-/issues/380
----
- test/sanitizer_test.rb | 21 ++++++++++++++-------
- 1 file changed, 14 insertions(+), 7 deletions(-)
-
-diff --git a/test/sanitizer_test.rb b/test/sanitizer_test.rb
-index e3ce218..e83c54d 100644
---- a/test/sanitizer_test.rb
-+++ b/test/sanitizer_test.rb
-@@ -54,7 +54,7 @@ def test_remove_xpaths_called_with_enumerable_xpaths
-
- def test_strip_tags_with_quote
- input = '<"
hi'
-- expected = libxml_2_9_14_recovery? ? %{<" hi} : %{ hi}
-+ expected = libxml_2_9_14_recovery_lt? ? %{<" hi} : %{ hi}
- assert_equal(expected, full_sanitize(input))
- end
-
-@@ -77,19 +77,19 @@ def test_strip_tags_multiline
-
- def test_remove_unclosed_tags
- input = "This is <-- not\n a comment here."
-- expected = libxml_2_9_14_recovery? ? %{This is <-- not\n a comment here.} : %{This is }
-+ expected = libxml_2_9_14_recovery_lt? ? %{This is <-- not\n a comment here.} : %{This is }
- assert_equal(expected, full_sanitize(input))
- end
-
- def test_strip_cdata
- input = "This has a ]]> here."
-- expected = libxml_2_9_14_recovery? ? %{This has a <![CDATA[]]> here.} : %{This has a ]]> here.}
-+ expected = libxml_2_9_14_recovery_lt_bang? ? %{This has a <![CDATA[]]> here.} : %{This has a ]]> here.}
- assert_equal(expected, full_sanitize(input))
- end
-
- def test_strip_unclosed_cdata
- input = "This has an unclosed ]] here..."
-- expected = libxml_2_9_14_recovery? ? %{This has an unclosed <![CDATA[]] here...} : %{This has an unclosed ]] here...}
-+ expected = libxml_2_9_14_recovery_lt_bang? ? %{This has an unclosed <![CDATA[]] here...} : %{This has an unclosed ]] here...}
- assert_equal(expected, full_sanitize(input))
- end
-
-@@ -464,13 +464,13 @@ def test_should_sanitize_img_vbscript
-
- def test_should_sanitize_cdata_section
- input = "section]]>"
-- expected = libxml_2_9_14_recovery? ? %{<![CDATA[section]]>} : %{section]]>}
-+ expected = libxml_2_9_14_recovery_lt_bang? ? %{<![CDATA[section]]>} : %{section]]>}
- assert_sanitized(input, expected)
- end
-
- def test_should_sanitize_unterminated_cdata_section
- input = "neverending..."
-- expected = libxml_2_9_14_recovery? ? %{<![CDATA[neverending...} : %{neverending...}
-+ expected = libxml_2_9_14_recovery_lt_bang? ? %{<![CDATA[neverending...} : %{neverending...}
- assert_sanitized(input, expected)
- end
-
-@@ -663,10 +663,17 @@ def convert_to_css_hex(string, escape_parens=false)
- end.join
- end
-
-- def libxml_2_9_14_recovery?
-+ def libxml_2_9_14_recovery_lt?
-+ # changed in 2.9.14, see https://github.com/sparklemotion/nokogiri/releases/tag/v1.13.5
- Nokogiri.method(:uses_libxml?).arity == -1 && Nokogiri.uses_libxml?(">= 2.9.14")
- end
-
-+ def libxml_2_9_14_recovery_lt_bang?
-+ # changed in 2.9.14, see https://github.com/sparklemotion/nokogiri/releases/tag/v1.13.5
-+ # then reverted in 2.10.0, see https://gitlab.gnome.org/GNOME/libxml2/-/issues/380
-+ Nokogiri.method(:uses_libxml?).arity == -1 && Nokogiri.uses_libxml?("= 2.9.14")
-+ end
-+
- def html5_mode?
- ::Loofah.respond_to?(:html5_mode?) && ::Loofah.html5_mode?
- end
diff --git a/rubygem-rails-html-sanitizer.spec b/rubygem-rails-html-sanitizer.spec
index 93807145489b6436f4e3f144c2bc68bebca9920b..3bad7499fa4efb3c3b507e1128337ea54d890987 100644
--- a/rubygem-rails-html-sanitizer.spec
+++ b/rubygem-rails-html-sanitizer.spec
@@ -1,21 +1,17 @@
%global gem_name rails-html-sanitizer
Name: rubygem-%{gem_name}
-Version: 1.4.3
+Version: 1.6.0
Release: 1
Summary: This gem is responsible to sanitize HTML fragments in Rails applications
License: MIT
URL: https://github.com/rails/rails-html-sanitizer
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
-# https://github.com/rails/rails-html-sanitizer/pull/143
-# libxml2 2.10.x changes incorrectly opened comments parsing
-Patch0: %{name}-1.4.3-tests-libxml2-2_10_0-parsing-comments-change.patch
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
BuildRequires: rubygem(loofah)
BuildRequires: rubygem(minitest)
-BuildRequires: rubygem(rails-dom-testing)
BuildArch: noarch
%description
@@ -32,7 +28,6 @@ Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version}
-%patch0 -p1
%build
gem build ../%{gem_name}-%{version}.gemspec
@@ -62,6 +57,9 @@ popd
%{gem_instdir}/test
%changelog
+* Thu Jul 24 2025 yaoxin <1024769339@qq.com> - 1.6.0-1
+- Update to 1.6.0 for fix build failure
+
* Mon Aug 14 2023 liqiuyu - 1.4.3-1
- Upgrade to 1.4.3
@@ -72,4 +70,4 @@ popd
- Upgrade to 1.4.2
* Tue Aug 25 2020 huangyangke - 1.0.4-1
-- package init
\ No newline at end of file
+- package init