Commit f79141a9 authored by Jan Gerber's avatar Jan Gerber
Browse files

strip out newline, carriage return, line feed from metadata

parent c2d6dcdd
......@@ -144,6 +144,9 @@ void json_add_key_value(FILE *output, char *key, void *value, int type, int last
p = (char *)value;
p = replace_str_all(p, "\\", "\\\\");
p = replace_str_all(p, "\"", "\\\"");
p = replace_str_all(p, "\n", "");
p = replace_str_all(p, "\f", "");
p = replace_str_all(p, "\r", "");
fprintf(output, "\"%s\": \"%s\"", key, p);
free(p);
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment