mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
NS1: TXT records are broken if they contain spaces (#270)
* Integration tests: Add simple TXT tests. * NS1: Fix bug in TXT record handling.
This commit is contained in:
@@ -126,10 +126,11 @@ func buildRecord(recs models.Records, domain string, id string) *dns.Record {
|
||||
Zone: domain,
|
||||
}
|
||||
for _, r := range recs {
|
||||
ans := &dns.Answer{
|
||||
Rdata: strings.Split(r.Target, " "),
|
||||
if r.Type == "TXT" {
|
||||
rec.AddAnswer(&dns.Answer{Rdata: []string{r.Target}})
|
||||
} else {
|
||||
rec.AddAnswer(&dns.Answer{Rdata: strings.Split(r.Target, " ")})
|
||||
}
|
||||
rec.AddAnswer(ans)
|
||||
}
|
||||
return rec
|
||||
}
|
||||
|
Reference in New Issue
Block a user