luci-base: fix backslash escaping in luci.util.serialize_json()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
parent
4ab6dcea9b
commit
6160a53ab9
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue