From e4d010e1c072fe5a3b146097b96e5bac17f7508b Mon Sep 17 00:00:00 2001 From: Philip Gladstone Date: Fri, 15 Sep 2017 16:25:13 -0400 Subject: [PATCH] Handle doublequotes in strings. (#2104) --- app/modules/sjson.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/modules/sjson.c b/app/modules/sjson.c index e5ed92f5..023a231e 100644 --- a/app/modules/sjson.c +++ b/app/modules/sjson.c @@ -765,6 +765,8 @@ static void encode_lua_object(lua_State *L, ENC_DATA *data, int argno, const cha } *d = '\0'; luaL_addstring(&b, value); + } else if (*str == '"') { + luaL_addstring(&b, "\\\""); } else { luaL_addchar(&b, *str); }