node-dig-dns icon indicating copy to clipboard operation
node-dig-dns copied to clipboard

potential bugfix for TXT records splitting after whitespace

Open lastarel opened this issue 2 years ago • 3 comments

Hi,

For TXT records that can have whitespaces such as: SPF records: IE: "v=spf1 include:_spf.google.com ~all" Prior to commit this would've been parsed as: dig(['google.com','TXT']).then((res)=>{ console.log(res.answer) })

{ domain: 'google.com.', type: 'TXT', ttl: '3591', class: 'IN', value: '~all"' },

Post commit: dig(['google.com','TXT']).then((res)=>{ console.log(res.answer) })

{ domain: 'google.com.', type: 'TXT', ttl: '3561', class: 'IN', value: '"v=spf1 include:_spf.google.com ~all"' },

lastarel avatar Oct 12 '21 11:10 lastarel