summaryrefslogtreecommitdiff
path: root/pyuno/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-09-16 10:53:21 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-09-16 12:55:06 +0200
commit2875d11939679ec319e5b098a9b85da629781d5c (patch)
tree4ba03561f5fba44e1b74e6ec3016b59c43117077 /pyuno/source
parentb855f9d430c4dce2936e7bd1208159bc38d5b199 (diff)
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 <sbergman@redhat.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'pyuno/source')
-rw-r--r--pyuno/source/loader/pythonloader.py3
1 files changed, 2 insertions, 1 deletions
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: