node-dig-dns
node-dig-dns copied to clipboard
potential bugfix for TXT records splitting after whitespace
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"' },