summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-03-18 12:43:29 +0100
committerJo-Philipp Wich <jow@openwrt.org>2015-03-18 12:43:29 +0100
commit6160a53ab992e998adcda7119e49096a65a7f5de (patch)
tree09d2c3cf68f39ea4a823210af9fd672b66e40c43 /modules/luci-base
parent4ab6dcea9b7111a23ac6c3bc8d14cfb93a7a52ff (diff)
luci-base: fix backslash escaping in luci.util.serialize_json()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-base')
-rw-r--r--modules/luci-base/luasrc/util.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-base/luasrc/util.lua b/modules/luci-base/luasrc/util.lua
index 8b28b1752..dcf8230b3 100644
--- 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