|
@@ -45,6 +45,9 @@ def gen_zone(args):
|
|
|
if "descr" in data:
|
|
|
comment += " " + data["descr"][0]
|
|
|
comment.replace('"', '')
|
|
|
+ # Bind and NSD are quite happy with UTF-8 in TXT records, but
|
|
|
+ # KnotDNS isn't (at least Knot 1.4.7). This is a hack to work around this.
|
|
|
+ comment = comment.encode('ascii', errors='xmlcharrefreplace').decode()
|
|
|
out.write('{} TXT "{} | DN42 | dn42 | | {}"\n'.format(asn, asn[2:], comment))
|
|
|
|
|
|
def cleanup(args):
|