X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=libs%2Fweb%2Fluasrc%2Fhttp.lua;h=18112507ce3565b6e7643ab8060fa61636282203;hp=60a3e0722808dd146c8bbe9306f659dc366925a0;hb=b0d3b82400abc1d3ae591e3a5b313584dda612a4;hpb=8772db16759352146a069f2bb7394a4a4213ba0f diff --git a/libs/web/luasrc/http.lua b/libs/web/luasrc/http.lua index 60a3e0722..18112507c 100644 --- a/libs/web/luasrc/http.lua +++ b/libs/web/luasrc/http.lua @@ -339,7 +339,7 @@ function write_json(x) else write(tostring(x)) end - elseif type(x) == "string" then + else write("%q" % tostring(x)) end end