public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rubygem-actiontext] rawhide: Backport upstream patch to support nokogiri 1.19.5 HTML5 serialization fix
Date: Thu, 12 Nov 2026 04:42:32 GMT	[thread overview]
Message-ID: <179445855290.1.14102459211994823020.rpms-rubygem-actiontext-6efbaa54f6df@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rubygem-actiontext
Branch : rawhide
Commit : 6efbaa54f6dfaa2501e9c0b3bf3474758bc1cf04
Author : Mamoru TASAKA <mtasaka@fedoraproject.org>
Date   : 2026-11-12T13:41:50+09:00
Stats  : +67/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rubygem-actiontext/c/6efbaa54f6dfaa2501e9c0b3bf3474758bc1cf04?branch=rawhide

Log:
Backport upstream patch to support nokogiri 1.19.5 HTML5 serialization fix

---
diff --git a/rubygem-actiontext-pr59550-nokogiri-1_19_5-html5-serialization.patch b/rubygem-actiontext-pr59550-nokogiri-1_19_5-html5-serialization.patch
new file mode 100644
index 0000000..5b6be26
--- /dev/null
+++ b/rubygem-actiontext-pr59550-nokogiri-1_19_5-html5-serialization.patch
@@ -0,0 +1,58 @@
+From 6db23850f4a872b293fdf88e9f34774514293f98 Mon Sep 17 00:00:00 2001
+From: Yasuo Honda <yasuo.honda@gmail.com>
+Date: Mon, 2 Nov 2026 20:40:26 -0600
+Subject: [PATCH] Merge pull request #59550 from
+ yahonda/actiontext-nokogiri-attribute-escape
+
+Compare Trix attachment HTML with assert_dom_equal
+
+(cherry picked from commit 4845462fbe13bd160e405d51f27f671ce6450eeb)
+---
+ actiontext/test/unit/attachment_test.rb | 4 +++-
+ actiontext/test/unit/content_test.rb    | 4 +++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/actiontext/test/unit/attachment_test.rb b/actiontext/test/unit/attachment_test.rb
+index f6e2eda052169..08621197505d5 100644
+--- a/actiontext/test/unit/attachment_test.rb
++++ b/actiontext/test/unit/attachment_test.rb
+@@ -3,6 +3,8 @@
+ require "test_helper"
+ 
+ class ActionText::AttachmentTest < ActiveSupport::TestCase
++  include Rails::Dom::Testing::Assertions::DomAssertions
++
+   test "from_attachable" do
+     attachment = ActionText::Attachment.from_attachable(attachable, caption: "Captioned")
+     assert_equal attachable, attachment.attachable
+@@ -82,7 +84,7 @@ class ActionText::AttachmentTest < ActiveSupport::TestCase
+   test "to_trix_html sanitizes action-text HTML content attachment" do
+     attachment = ActionText::Content.new("<action-text-attachment content-type=\"text/html\" content=\"<img src=. onerror='alert(location)' />\"></action-text-attachment>")
+ 
+-    assert_equal "<figure data-trix-attachment=\"{&quot;contentType&quot;:&quot;text/html&quot;,&quot;content&quot;:&quot;<img src=\\&quot;.\\&quot;>&quot;}\"></figure>", attachment.to_trix_html
++    assert_dom_equal "<figure data-trix-attachment=\"{&quot;contentType&quot;:&quot;text/html&quot;,&quot;content&quot;:&quot;<img src=\\&quot;.\\&quot;>&quot;}\"></figure>", attachment.to_trix_html
+   end
+ 
+   test "defaults trix partial to model partial" do
+diff --git a/actiontext/test/unit/content_test.rb b/actiontext/test/unit/content_test.rb
+index b2c40e19e4752..5b024bef286b2 100644
+--- a/actiontext/test/unit/content_test.rb
++++ b/actiontext/test/unit/content_test.rb
+@@ -3,6 +3,8 @@
+ require "test_helper"
+ 
+ class ActionText::ContentTest < ActiveSupport::TestCase
++  include Rails::Dom::Testing::Assertions::DomAssertions
++
+   test "equality" do
+     html = "<div>test</div>"
+     content = content_from_html(html)
+@@ -161,7 +163,7 @@ class ActionText::ContentTest < ActiveSupport::TestCase
+   test "sanitizes attachment markup for Trix" do
+     html = '<action-text-attachment content="<img src=\&quot;.\&quot; onerror=alert>"></action-text-attachment>'
+     trix_html = '<figure data-trix-attachment="{&quot;content&quot;:&quot;<img src=\\&quot;\\\\%22.\\\\%22\\&quot;>&quot;}"></figure>'
+-    assert_equal trix_html, content_from_html(html).to_trix_html.strip
++    assert_dom_equal trix_html, content_from_html(html).to_trix_html.strip
+   end
+ 
+   test "removes content attribute if it's value is empty" do

diff --git a/rubygem-actiontext.spec b/rubygem-actiontext.spec
index 1104511..8bc290c 100644
--- a/rubygem-actiontext.spec
+++ b/rubygem-actiontext.spec
@@ -8,7 +8,7 @@
 
 Name: rubygem-%{gem_name}
 Version: 8.1.3.1
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: Rich text framework
 License: MIT
 URL: https://rubyonrails.org
@@ -28,6 +28,10 @@ Source2: %{gem_name}-%{version}%{?prerelease}-js.tar.gz
 # ~~~
 # https://github.com/rails/rails/pull/57283
 Patch0: rubygem-actiontext-8.1.3-Avoid-assert-nil-when-testing-objects-that-override-nil-.patch
+# https://github.com/rails/rails/pull/59550
+# https://github.com/rails/rails/commit/6db23850f4a872b293fdf88e9f34774514293f98
+# Support nokogiri 1.19.5 and above which fixes HTML5 serialization
+Patch1: rubygem-actiontext-pr59550-nokogiri-1_19_5-html5-serialization.patch
 
 BuildRequires: ruby(release)
 BuildRequires: rubygems-devel
@@ -68,6 +72,7 @@ Documentation for %{name}.
 
 ( cd %{builddir}
 %patch 0 -p2
+%patch 1 -p2
 )
 
 %build
@@ -153,6 +158,9 @@ ruby -Itest -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
 %doc %{gem_instdir}/README.md
 
 %changelog
+* Thu Nov 12 2026 Mamoru TASAKA <mtasaka@fedoraproject.org> - 8.1.3.1-2
+- Backport upstream patch to support nokogiri 1.19.5 HTML5 serialization fix
+
 * Mon Aug 03 2026 Vít Ondruch <vondruch@redhat.com> - 8.1.3.1-1
 - Update to Action Text 8.1.3.1.
   Related: rhzb#2405582

                 reply	other threads:[~2026-11-12  4:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179445855290.1.14102459211994823020.rpms-rubygem-actiontext-6efbaa54f6df@fedoraproject.org \
    --to=mtasaka@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox