projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libs/web: transparently handle userdata in write_json()
[project/luci.git]
/
libs
/
web
/
luasrc
/
http.lua
diff --git
a/libs/web/luasrc/http.lua
b/libs/web/luasrc/http.lua
index
60a3e07
..
1811250
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
write(tostring(x))
end
- else
if type(x) == "string" then
+ else
write("%q" % tostring(x))
end
end
write("%q" % tostring(x))
end
end