diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-09-15 14:25:18 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-09-15 14:25:18 +0000 |
commit | b0d3b82400abc1d3ae591e3a5b313584dda612a4 (patch) | |
tree | c8d5267b78be78bfddc568a01f623848a6c0b24d /libs/web/luasrc/http.lua | |
parent | 8772db16759352146a069f2bb7394a4a4213ba0f (diff) |
libs/web: transparently handle userdata in write_json()
Diffstat (limited to 'libs/web/luasrc/http.lua')
-rw-r--r-- | libs/web/luasrc/http.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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 |