summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-08-03 16:37:48 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-08-07 23:12:39 +0200
commit7442e1c0364df5f8a7bb8c0891e7ac8e9dff59a8 (patch)
tree5c8d32e7dfc2fc9fa181e81d4e1a84285d16a319
parent727b9a24d4fa47439c11f9d9ee32530eea2b3d8a (diff)
keep name percent-encoded
Change-Id: I470c4b24192c3e3c9b556a9bbb3b084359e0033b Reviewed-on: https://gerrit.libreoffice.org/77006 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 315c51731384230194af26b86a976bf5d06c9dcc) Reviewed-on: https://gerrit.libreoffice.org/77096 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r--scripting/source/pyprov/pythonscript.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index 9609b6d94640..6625b226f609 100644
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -218,7 +218,9 @@ class MyUriHelper:
# path to the .py file + "$functionname, arguments, etc
xStorageUri = self.m_uriRefFac.parse(scriptURI)
- sStorageUri = xStorageUri.getName().replace( "|", "/" );
+ # getName will apply url-decoding to the name, so encode back
+ sStorageUri = xStorageUri.getName().replace("%", "%25")
+ sStorageUri = sStorageUri.replace( "|", "/" )
# path to the .py file, relative to the base
sFileUri = sStorageUri[0:sStorageUri.find("$")]