diff --git a/parse_test.go b/parse_test.go index 75129e10..0c89e85d 100644 --- a/parse_test.go +++ b/parse_test.go @@ -545,6 +545,11 @@ func TestParseBackslash(t *testing.T) { } else { t.Logf("Parsed %s\n", r.String()) } + if r, e := NewRR(`m\ @\ iek.nl. IN 3600 A 127.0.0.1`); e != nil { + t.Fatalf("Could not create RR with \\ and \\@ in it") + } else { + t.Logf("Parsed %s\n", r.String()) + } } func TestILNP(t *testing.T) { diff --git a/zscan.go b/zscan.go index 9c5444cb..109d0fd7 100644 --- a/zscan.go +++ b/zscan.go @@ -510,6 +510,12 @@ func zlexer(s *scan, c chan lex) { switch x { case ' ', '\t': + if escape { + escape = false + str[stri] = x + stri++ + break + } if quote { // Inside quotes this is legal str[stri] = x