[Libreoffice-commits] core.git: oox/source sw/qa

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 21 15:22:29 UTC 2019


 oox/source/core/xmlfilterbase.cxx       |    2 +-
 sw/qa/extras/ooxmlexport/ooxmllinks.cxx |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 10e972c5fba698b287b6f19d7b249e38b18f8895
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Aug 21 15:19:30 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Aug 21 17:21:14 2019 +0200

    Better use DecodeMechanims ToIUri rather than Unambiguous here
    
    ...to avoid erroneously un-escaping input like "file:///%3C" to "file:///<"
    
    Change-Id: I973208dac38799794216e1ee36a63662d434e8cf
    Reviewed-on: https://gerrit.libreoffice.org/77886
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index a5d565e93839..d62250344686 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -517,7 +517,7 @@ OUString lclAddRelation( const Reference< XRelationshipAccess >& rRelations, sal
     aEntry[0].First = "Type";
     aEntry[0].Second = rType;
     aEntry[1].First = "Target";
-    aEntry[1].Second = INetURLObject::decode(rTarget, INetURLObject::DecodeMechanism::Unambiguous, RTL_TEXTENCODING_UTF8);
+    aEntry[1].Second = INetURLObject::decode(rTarget, INetURLObject::DecodeMechanism::ToIUri, RTL_TEXTENCODING_UTF8);
     if( bExternal )
     {
         aEntry[2].First = "TargetMode";
diff --git a/sw/qa/extras/ooxmlexport/ooxmllinks.cxx b/sw/qa/extras/ooxmlexport/ooxmllinks.cxx
index 3939fc69b723..476c4fc5408d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmllinks.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmllinks.cxx
@@ -267,7 +267,7 @@ DECLARE_LINKS_EXPORT_TEST(testNon_ascii_link_export, "non_ascii_link.docx", USE_
 
     OUString sTarget = "file:///C:/TEMP/%C3%A9kezet.docx";
     assertXPath(pXmlDoc, "/rels:Relationships/rels:Relationship[@TargetMode='External']", "Target",
-                INetURLObject::decode( sTarget, INetURLObject::DecodeMechanism::Unambiguous,
+                INetURLObject::decode( sTarget, INetURLObject::DecodeMechanism::ToIUri,
                 RTL_TEXTENCODING_UTF8));
 }
 


More information about the Libreoffice-commits mailing list