Index: src/htsmsg_json.c =================================================================== --- src/htsmsg_json.c (revision 5703) +++ src/htsmsg_json.c (working copy) @@ -37,13 +37,17 @@ htsbuf_append(hq, "\"", 1); while(*s != 0) { - if(*s == '"' || *s == '\\' || *s == '\n') { + if(*s == '"' || *s == '\\' || *s == '\n' || *s == '\t' || *s == '\r') { htsbuf_append(hq, str, s - str); if(*s == '"') htsbuf_append(hq, "\\\"", 2); else if(*s == '\n') htsbuf_append(hq, "\\n", 2); + else if(*s == '\t') + htsbuf_append(hq, "\\t", 2); + else if(*s == '\r') + htsbuf_append(hq, "\\r", 2); else htsbuf_append(hq, "\\\\", 2); s++;