Skip to content

Commit

Permalink
txt fix
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Mar 30, 2022
1 parent 0a3fb16 commit a97b293
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rr/txt.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down Expand Up @@ -114,6 +113,8 @@ function asQuotedStrings (data) {
if (data.length > 255) {
return data.match(/(.{1,255})/g).join('" "')
}

return data
}

module.exports = TXT

0 comments on commit a97b293

Please sign in to comment.