Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ func unquoteBytes(s []byte) (t []byte, ok bool) {
}

// Quote, control characters are invalid.
case orig[0] == '"' && c == '"', orig[0] == '\'' && c == '\'', c < ' ':
case orig[0] == '"' && c == '"', orig[0] == '\'' && c == '\'', c < ' ' && c != '\t':
return

// ASCII
Expand Down
3 changes: 3 additions & 0 deletions scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,9 @@ func stateInStringDouble(s *scanner, c byte) int {
s.step = stateInStringEsc(stateInStringDouble)
return scanContinue
}
if c == '\t' {
return scanContinue
}
if c < 0x20 {
return s.error(c, "in string literal")
}
Expand Down