From e5feb532fdde88592126356815548d1a447b4cd4 Mon Sep 17 00:00:00 2001 From: Tobias Bittner Date: Sun, 1 Oct 2023 17:42:19 +0200 Subject: [PATCH] Fixed problem from issue #183 (#184) The xpath in set_value_by_xpath is now also url encoded. Now requests with selectors (e.g. "some/xpath[Key='Value']") are possible without "Invalid format" errors. --- sagemcom_api/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sagemcom_api/client.py b/sagemcom_api/client.py index 4c90681..044b8ed 100644 --- a/sagemcom_api/client.py +++ b/sagemcom_api/client.py @@ -349,7 +349,7 @@ async def set_value_by_xpath( actions = { "id": 0, "method": "setValue", - "xpath": xpath, + "xpath": urllib.parse.quote(xpath), "parameters": {"value": str(value)}, "options": options, }