diff --git a/hetzner/records.go b/hetzner/records.go index 849e0f5..bec7752 100644 --- a/hetzner/records.go +++ b/hetzner/records.go @@ -81,8 +81,10 @@ func GetRecords(zone *Zone) error { continue } - record.Value = strings.TrimPrefix(record.Value, "\"") - record.Value = strings.TrimSuffix(record.Value, "\"") + if !strings.EqualFold(record.Type, "TXT") || len(record.Value) <= 255 { + record.Value = strings.TrimPrefix(record.Value, "\"") + record.Value = strings.TrimSuffix(record.Value, "\"") + } recordsToKeep = append(recordsToKeep, record) }