summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-09-16 10:53:21 +0300
committerXisco Fauli <xiscofauli@libreoffice.org>2022-09-19 17:22:45 +0200
commit312704298ebff67db4a747014b8a0c5a306b665a (patch)
treeb243f3558e23c88c012b805d70035358caefc6af
parentResolves: tdf#151046 INDIRECT() try named expressions and DB range names first (diff)
downloadcore-312704298ebff67db4a747014b8a0c5a306b665a.tar.gz
core-312704298ebff67db4a747014b8a0c5a306b665a.zip
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> (cherry picked from commit 2875d11939679ec319e5b098a9b85da629781d5c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139992 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-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: