only remove double escaped semicolons
check code / check-code (push) Failing after 33s Details

Signed-off-by: Ivan Schaller <ivan@schaller.sh>
This commit is contained in:
Ivan Schaller 2024-02-29 23:33:30 +01:00
parent 78448d2bde
commit 1cb141c2be
1 changed files with 2 additions and 2 deletions

View File

@ -91,12 +91,12 @@ class NetBoxDNSProvider(octodns.provider.base.BaseProvider):
return absolute_value
def _escape_semicolon(self, value: str) -> str:
fixed = value.replace(";", "\\;")
fixed = value.replace(";", r"\;")
self.log.debug(f"in='{value}', escaped='{fixed}'")
return fixed
def _unescape_semicolon(self, value: str) -> str:
fixed = value.replace("\\\\", "\\").replace("\\;", ";")
fixed = value.replace(r"\\;", ";")
self.log.debug(f"in='{value}', unescaped='{fixed}'")
return fixed