projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8772db1
)
libs/web: transparently handle userdata in write_json()
author
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 15 Sep 2012 14:25:18 +0000
(14:25 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 15 Sep 2012 14:25:18 +0000
(14:25 +0000)
libs/web/luasrc/http.lua
patch
|
blob
|
history
diff --git
a/libs/web/luasrc/http.lua
b/libs/web/luasrc/http.lua
index 60a3e0722808dd146c8bbe9306f659dc366925a0..18112507ce3565b6e7643ab8060fa61636282203 100644
(file)
--- 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
- else
if type(x) == "string" then
+ else
write("%q" % tostring(x))
end
end