mirror of
https://github.com/curl/curl.git
synced 2026-05-30 06:17:28 +03:00
tool_writeout_json: fix encoding of control characters
Control characters without a special escape sequence e.g. %00 or %06 were being encoded as "u0006" instead of "\u0006". Ref: https://github.com/curl/trurl/pull/214#discussion_r1257487858 Closes #11414
This commit is contained in:
parent
15b131352b
commit
8484ad09da
1 changed files with 1 additions and 1 deletions
|
|
@ -62,7 +62,7 @@ void jsonWriteString(FILE *stream, const char *in, bool lowercase)
|
|||
break;
|
||||
default:
|
||||
if(*i < 32) {
|
||||
fprintf(stream, "u%04x", *i);
|
||||
fprintf(stream, "\\u%04x", *i);
|
||||
}
|
||||
else {
|
||||
char out = *i;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue