[Libreoffice-commits] core.git: Branch 'libreoffice-6-2-6' - scripting/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 8 19:27:21 UTC 2019


 scripting/source/pyprov/pythonscript.py |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 3ff117a020def02de0041d67825a124be95c3ec5
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sat Aug 3 16:37:48 2019 +0100
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Thu Aug 8 21:26:37 2019 +0200

    keep name percent-encoded
    
    Change-Id: I470c4b24192c3e3c9b556a9bbb3b084359e0033b
    Reviewed-on: https://gerrit.libreoffice.org/77007
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index f1b2bfc75ee3..64e1337d642e 100644
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -219,7 +219,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("$")]


More information about the Libreoffice-commits mailing list