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:
4ab6dce
)
luci-base: fix backslash escaping in luci.util.serialize_json()
author
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 18 Mar 2015 11:43:29 +0000
(12:43 +0100)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 18 Mar 2015 11:43:29 +0000
(12:43 +0100)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
modules/luci-base/luasrc/util.lua
patch
|
blob
|
history
diff --git
a/modules/luci-base/luasrc/util.lua
b/modules/luci-base/luasrc/util.lua
index 8b28b1752de719e2525395469771ab0cf625690c..dcf8230b3ebe573b6b37246c1ffb29f91f481ca3 100644
(file)
--- a/
modules/luci-base/luasrc/util.lua
+++ b/
modules/luci-base/luasrc/util.lua
@@
-643,7
+643,7
@@
function serialize_json(x, cb)
push(tostring(x))
end
else
- push('"%s"' % tostring(x):gsub('["%z\1-\31]',
+ push('"%s"' % tostring(x):gsub('["%z\1-\31
\\
]',
function(c) return '\\u%04x' % c:byte(1) end))
end