Skip to content

Commit bcb80f1

Browse files
committed
Fix: incorrect XPath quoting (Fixes #431)
1 parent 05d7531 commit bcb80f1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sagemcom_api/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ async def get_values_by_xpaths(self, xpaths, options: dict | None = None) -> dic
445445
{
446446
"id": i,
447447
"method": "getValue",
448-
"xpath": urllib.parse.quote(xpath),
448+
"xpath": urllib.parse.quote(xpath, "/=[]'"),
449449
"options": options if options else {},
450450
}
451451
for i, xpath in enumerate(xpaths.values())
@@ -481,7 +481,7 @@ async def set_value_by_xpath(
481481
actions = {
482482
"id": 0,
483483
"method": "setValue",
484-
"xpath": urllib.parse.quote(xpath),
484+
"xpath": urllib.parse.quote(xpath, "/=[]'"),
485485
"parameters": {"value": str(value)},
486486
"options": options if options else {},
487487
}

0 commit comments

Comments
 (0)