Bug 2062599

Summary: libxml2-2.9.13 breaks various stuff
Product: [Fedora] Fedora Reporter: Vít Ondruch <vondruch>
Component: libxml2Assignee: Igor Raits <igor.raits>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: amigadave, igor.raits, veillard
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-18 08:09:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vít Ondruch 2022-03-10 09:11:20 UTC
Description of problem:
It seems that libxml2 breaks various stuff. Just noticed these two libraries become FTBFS after update:

https://koschei.fedoraproject.org/package/rubygem-actionview?collection=f35


~~~
* Test file: test/template/sanitize_helper_test.rb
Run options: --seed 14898
# Running:
...F
Failure:
SanitizeHelperTest#test_strip_links [test/template/sanitize_helper_test.rb:15]:
Expected: "&lt;malformed &amp; link"
  Actual: "malformed &amp; link"
~~~

https://koschei.fedoraproject.org/package/rubygem-rails-html-sanitizer?collection=f35

~~~
  1) Failure:
SanitizersTest#test_strip_invalid_html [/builddir/build/BUILD/rails-html-sanitizer-1.4.2/usr/share/gems/gems/rails-html-sanitizer-1.4.2/test/sanitizer_test.rb:61]:
--- expected
+++ actual
@@ -1,3 +1 @@
-# encoding: UTF-8
-#    valid: true
-"&lt;&lt;"
+""
~~~

So it seems the `&lt;` is not escaped anymore.

Version-Release number of selected component (if applicable):
libxml2-2.9.13


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
The `&lt;` is not in the escaped output anymore therefore some test suites are broken


Expected results:
The test suites and packages keep working.


Additional info:
TBH, this is a bit annoying, especially because this change happened not just in Rawhide, but also in stable F35. Also, it seems to me that libxml2 keeps changing the escaping quite a lot and I don't understand why. Therefore, could you check for example these two libraries that they keep working prior you submit such update?

Comment 1 Vít Ondruch 2022-03-18 09:46:48 UTC
Thx for the upstream report and for the analysis. I see that the Nokogiri author, which is likely the library used on background to parse the XML is involved in the discussion. So should it stay the way it currently is, I'll probably need to follow up with Nokogiri or so.

Comment 2 David King 2022-03-18 10:23:13 UTC
Please check against https://src.fedoraproject.org/rpms/libxml2/pull-request/11 which includes a backport of the upstream fix.

Comment 3 Vít Ondruch 2022-03-18 13:35:05 UTC
Well, this fixes some places, such as rubygem-actionview test failures, but keeps (and changes) test failures in rubygem-rails-html-sanitizer. I have opened this ticket against Nokogiri (Ruby binding for the libxml2):


https://github.com/sparklemotion/nokogiri/issues/2479

Comment 4 David King 2022-05-18 08:09:23 UTC
2.9.14 includes the upstream change from comment #2, and the nokogiri developers have adjusted their test suite to work with that, so this seems resolved now.