]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Don't double-escape lua strings in libucl 2240/head
authorPaul Arthur <paul.arthur@flowerysong.com>
Thu, 10 May 2018 16:05:38 +0000 (16:05 +0000)
committerPaul Arthur <paul.arthur@flowerysong.com>
Thu, 10 May 2018 16:46:53 +0000 (16:46 +0000)
Strings are escaped during JSON/UCL output, so escaping them while
building the object results in doubly escaped strings.

contrib/libucl/lua_ucl.c

index d2557a57f40745f3acfa7087bbfc4e2c18e3e2c8..b97387d9eb42459473454ffab28adc549b426b7c 100644 (file)
@@ -550,10 +550,10 @@ ucl_object_lua_import_escape (lua_State *L, int idx)
        t = lua_type (L, idx);
        switch (t) {
        case LUA_TTABLE:
-               obj = ucl_object_lua_fromtable (L, idx, UCL_STRING_ESCAPE);
+               obj = ucl_object_lua_fromtable (L, idx, UCL_STRING_RAW);
                break;
        default:
-               obj = ucl_object_lua_fromelt (L, idx, UCL_STRING_ESCAPE);
+               obj = ucl_object_lua_fromelt (L, idx, UCL_STRING_RAW);
                break;
        }