diff options
| author | Jo-Philipp Wich | 2015-03-18 11:43:29 +0000 |
|---|---|---|
| committer | Jo-Philipp Wich | 2015-03-18 11:43:29 +0000 |
| commit | 6160a53ab992e998adcda7119e49096a65a7f5de (patch) | |
| tree | 09d2c3cf68f39ea4a823210af9fd672b66e40c43 | |
| parent | 4ab6dcea9b7111a23ac6c3bc8d14cfb93a7a52ff (diff) | |
| download | luci-6160a53ab992e998adcda7119e49096a65a7f5de.tar.gz | |
luci-base: fix backslash escaping in luci.util.serialize_json()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
| -rw-r--r-- | modules/luci-base/luasrc/util.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-base/luasrc/util.lua b/modules/luci-base/luasrc/util.lua index 8b28b1752d..dcf8230b3e 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 |