diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2023-04-18 11:23:39 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-04-19 13:54:22 +0200 |
commit | 517c9ca21101d952caad1ec51f887340d9a634a9 (patch) | |
tree | 008490b1e83a7a6bf0e21ed88d1e37d02b1679eb /sw | |
parent | 90cbe517ad21c5425516f0b2441504c33abfe50a (diff) |
libxml2: upgrade to release 2.10.4
Fixes CVE-2023-29469 and CVE-2023-28484.
Also: SAX2: Ignore namespaces in HTML documents
which is probably the reason why one test fails, so switch it to parsing
XML:
HTML parser error : Tag reqif-xhtml:div invalid
<reqif-xhtml:div>
HTML parser error : Tag reqif-xhtml:table invalid
<reqif-xhtml:table cellpadding="2" cellspacing="2">
...
reqif-table.xhtml:
C:/cygwin/home/tdf/jenkins/workspace/gerrit_windows/test/source/xmltesttools.cxx:195:testReqIfTable::Import_Export
equality assertion failed
- Expected: 1
- Actual : 0
- In <file:///C:/cygwin/home/tdf/jenkins/workspace/gerrit_windows/tempdir/lu134607bxu8q.tmp>, XPath '/html/body/div/table/tr/th' number of nodes is incorrect
Change-Id: Icc161b39515c996193366bc777a67eca79e4e892
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150544
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit b28fd940ca46828be624679863364b4db89dd38c)
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/htmlexport/htmlexport.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index fadd91b728fb..7a3c3aa7638b 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -492,17 +492,25 @@ DECLARE_HTMLEXPORT_TEST(testReqIfJpgImg, "reqif-jpg-img.xhtml") DECLARE_HTMLEXPORT_TEST(testReqIfTable, "reqif-table.xhtml") { - htmlDocPtr pDoc = parseHtml(maTempFile); + SvMemoryStream aStream; + HtmlExportTest::wrapFragment(maTempFile, aStream); + xmlDocPtr pDoc = parseXmlStream(&aStream); CPPUNIT_ASSERT(pDoc); // <div> was missing, so the XHTML fragment wasn't a valid // xhtml.BlkStruct.class type anymore. - assertXPath(pDoc, "/html/body/div/table/tr/th", 1); + assertXPath(pDoc, + "/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:table/reqif-xhtml:tr/reqif-xhtml:th", + 1); // The attribute was present to contain "background" and "border", which is // ignored in reqif-xhtml. - assertXPathNoAttribute(pDoc, "/html/body/div/table/tr/th", "style"); + assertXPathNoAttribute( + pDoc, "/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:table/reqif-xhtml:tr/reqif-xhtml:th", + "style"); // The attribute was present, which is not valid in reqif-xhtml. - assertXPathNoAttribute(pDoc, "/html/body/div/table/tr/th", "bgcolor"); + assertXPathNoAttribute( + pDoc, "/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:table/reqif-xhtml:tr/reqif-xhtml:th", + "bgcolor"); } DECLARE_HTMLEXPORT_TEST(testReqIfTable2, "reqif-table2.odt") |