fix semicolon escaping
This commit is contained in:
parent
a8ecfab930
commit
6e624a79a7
1 changed files with 3 additions and 4 deletions
|
@ -1,5 +1,4 @@
|
||||||
import logging
|
import logging
|
||||||
import re
|
|
||||||
from typing import Any, Literal
|
from typing import Any, Literal
|
||||||
|
|
||||||
import dns.rdata
|
import dns.rdata
|
||||||
|
@ -102,11 +101,11 @@ class NetBoxDNSProvider(octodns.provider.base.BaseProvider):
|
||||||
@return: the modified record value
|
@return: the modified record value
|
||||||
"""
|
"""
|
||||||
if escape:
|
if escape:
|
||||||
value = re.sub(r"\\*;", "\\;", value)
|
fixed = value.replace(";", "\\;")
|
||||||
else:
|
else:
|
||||||
value = re.sub(r"\\*;", ";", value)
|
fixed = value.replace("\\;", ";")
|
||||||
|
|
||||||
return value
|
return fixed
|
||||||
|
|
||||||
def _get_nb_view(self, view: str | None | Literal[False]) -> dict[str, int | str]:
|
def _get_nb_view(self, view: str | None | Literal[False]) -> dict[str, int | str]:
|
||||||
"""get the correct netbox view when requested
|
"""get the correct netbox view when requested
|
||||||
|
|
Loading…
Reference in a new issue