summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-08-21 15:19:30 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-08-21 17:21:14 +0200
commit10e972c5fba698b287b6f19d7b249e38b18f8895 (patch)
treed4473535ae4fe9c5b71583eb776d6e8eeff8e06c
parent8c01d962ee98138acc1a61512f3775610be529be (diff)
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@redhat.com>
-rw-r--r--oox/source/core/xmlfilterbase.cxx2
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmllinks.cxx2
2 files changed, 2 insertions, 2 deletions
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));
}