ZedZone
|
Blog
|
Software
|
Code
projects
/
playerz
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c9bf4f
)
Escape "'s for json output.
playerz-1
author
Not Zed
<notzed@gmail.com>
Mon, 18 Mar 2024 03:05:03 +0000
(13:35 +1030)
committer
Not Zed
<notzed@gmail.com>
Mon, 18 Mar 2024 03:05:03 +0000
(13:35 +1030)
http-monitor.c
patch
|
blob
|
history
diff --git
a/http-monitor.c
b/http-monitor.c
index
de5ebbc
..
c94defb
100644
(file)
--- a/
http-monitor.c
+++ b/
http-monitor.c
@@
-133,6
+133,9
@@
static void json_print(struct obstack *os, uint8_t *s) {
while ((c = *s++)) {
if (c < 32) {
obstack_1grow(os, '?');
+ } else if (c == '"') {
+ obstack_1grow(os, '\\');
+ obstack_1grow(os, c);
} else if (c == '\\') {
obstack_1grow(os, c);
obstack_1grow(os, c);