Skip to content

Commit 74a9cec

Browse files
author
Robert Hegner
committed
Disable xpath escape
1 parent a483eac commit 74a9cec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sagemcom_api/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ async def get_encryption_method(self):
404404
max_tries=1,
405405
on_backoff=retry_login,
406406
)
407-
async def get_value_by_xpath(self, xpath: str, options: dict | None = None) -> dict:
407+
async def get_value_by_xpath(self, xpath: str, options: dict | None = None, escape_xpath: bool | None = True) -> dict:
408408
"""
409409
Retrieve raw value from router using XPath.
410410
@@ -414,7 +414,7 @@ async def get_value_by_xpath(self, xpath: str, options: dict | None = None) -> d
414414
actions = {
415415
"id": 0,
416416
"method": "getValue",
417-
"xpath": urllib.parse.quote(xpath),
417+
"xpath": urllib.parse.quote(xpath) if escape_xpath else xpath,
418418
"options": options if options else {},
419419
}
420420

0 commit comments

Comments
 (0)