From a97b29389f2d6050584c8483e06abde488fd153d Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Tue, 29 Mar 2022 17:54:31 -0700 Subject: [PATCH] txt fix --- rr/txt.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rr/txt.js b/rr/txt.js index aa96c1d..2e3cb84 100644 --- a/rr/txt.js +++ b/rr/txt.js @@ -83,8 +83,7 @@ class TXT extends RR { /****** EXPORTERS *******/ toBind (zone_opts) { - const data = asQuotedStrings(this.get('data')) - return `${this.getPrefix(zone_opts)}\t"${data}"\n` + return `${this.getPrefix(zone_opts)}\t"${asQuotedStrings(this.get('data'))}"\n` } toMaraDNS () { @@ -114,6 +113,8 @@ function asQuotedStrings (data) { if (data.length > 255) { return data.match(/(.{1,255})/g).join('" "') } + + return data } module.exports = TXT