func->ucl_emitter_append_character ('"', 1, func->ud);
while (size) {
- if (ucl_test_character (*p, UCL_CHARACTER_JSON_UNSAFE|UCL_CHARACTER_DENIED)) {
+ if (ucl_test_character (*p, (UCL_CHARACTER_JSON_UNSAFE|
+ UCL_CHARACTER_DENIED|
+ UCL_CHARACTER_WHITESPACE_UNSAFE))) {
if (len > 0) {
func->ucl_emitter_append_len (c, len, func->ud);
}
case '\f':
func->ucl_emitter_append_len ("\\f", 2, func->ud);
break;
+ case '\v':
+ func->ucl_emitter_append_len ("\\v", 2, func->ud);
+ break;
case '\\':
func->ucl_emitter_append_len ("\\\\", 2, func->ud);
break;
+ case ' ':
+ func->ucl_emitter_append_character (' ', 1, func->ud);
+ break;
case '"':
func->ucl_emitter_append_len ("\\\"", 2, func->ud);
break;