Actions
Bug #335
closedjson encoder don't encode /t and /r
Start date:
Due date:
% Done:
0%
Estimated time:
Found in version:
Affected Versions:
Description
The problem is in hte json encoder.
I have fixed the problem and added the patch to this ticket
Patch:
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++;
Files
Updated by Andreas Smas almost 15 years ago
- Status changed from New to Fixed
- Target version changed from 3.0 to 2.13
Fixed in d8ccf48b06bf47a4ed53bafd9f653c6c3c0e80a4
Actions