pyuno/source/loader/pythonloader.py |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 2875d11939679ec319e5b098a9b85da629781d5c
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Fri Sep 16 10:53:21 2022 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Fri Sep 16 12:55:06 2022 +0200

    tdf#150982: properly unquote (URL-decode) vnd.sun.star.expand payload
    
    Similar to what is done in bootstrap_expandUri, expandUnoRcUrl,
    UrlReference::expand, JavaLoader.expand_url, and is documented
    in XVndSunStarExpandUrl interface.
    
    Change-Id: I92917adb38e42c3926494427e4df2451298033e0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140042
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    Tested-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/pyuno/source/loader/pythonloader.py 
b/pyuno/source/loader/pythonloader.py
index 9a7114aea210..02f901942cbb 100644
--- a/pyuno/source/loader/pythonloader.py
+++ b/pyuno/source/loader/pythonloader.py
@@ -21,6 +21,7 @@ import unohelper
 import sys
 import types
 import os
+from urllib.parse import unquote
 from com.sun.star.uno import Exception,RuntimeException
 from com.sun.star.loader import XImplementationLoader
 from com.sun.star.lang import XServiceInfo
@@ -68,7 +69,7 @@ class Loader( XImplementationLoader, XServiceInfo, 
unohelper.Base ):
         protocol, dependent = splitUrl( url )
         if "vnd.sun.star.expand" == protocol:
             exp = self.ctx.getValueByName( 
"/singletons/com.sun.star.util.theMacroExpander" )
-            url = exp.expandMacros(dependent)
+            url = exp.expandMacros(unquote(dependent))
             protocol,dependent = splitUrl( url )
 
         if DEBUG:

Reply via email to