From bcb80f17fa0968f9bb5f433a3c859cdeabccc90c Mon Sep 17 00:00:00 2001 From: Ferenc Bakonyi Date: Thu, 18 Dec 2025 06:28:12 +0000 Subject: [PATCH] Fix: incorrect XPath quoting (Fixes #431) --- sagemcom_api/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sagemcom_api/client.py b/sagemcom_api/client.py index 203153a..4d8347d 100644 --- a/sagemcom_api/client.py +++ b/sagemcom_api/client.py @@ -445,7 +445,7 @@ async def get_values_by_xpaths(self, xpaths, options: dict | None = None) -> dic { "id": i, "method": "getValue", - "xpath": urllib.parse.quote(xpath), + "xpath": urllib.parse.quote(xpath, "/=[]'"), "options": options if options else {}, } for i, xpath in enumerate(xpaths.values()) @@ -481,7 +481,7 @@ async def set_value_by_xpath( actions = { "id": 0, "method": "setValue", - "xpath": urllib.parse.quote(xpath), + "xpath": urllib.parse.quote(xpath, "/=[]'"), "parameters": {"value": str(value)}, "options": options if options else {}, }