diff options
author | Yousong Zhou <yszhou4tech@gmail.com> | 2015-11-25 22:39:27 +0800 |
---|---|---|
committer | Yousong Zhou <yszhou4tech@gmail.com> | 2015-12-02 20:56:08 +0800 |
commit | 862b84feb2bc860c049b4b6fa990f92291cb4728 (patch) | |
tree | 5a59b3040dfe76888dc2f7574e11bae7056290fc /modules/luci-base/luasrc | |
parent | 9b30357454ea53a9f1d7e82d8f894db5f409de98 (diff) |
luci-base: fix escaping lua string to js repr
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'modules/luci-base/luasrc')
-rw-r--r-- | modules/luci-base/luasrc/view/cbi/value.htm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-base/luasrc/view/cbi/value.htm b/modules/luci-base/luasrc/view/cbi/value.htm index 8a08e08f2..c43dab5f4 100644 --- a/modules/luci-base/luasrc/view/cbi/value.htm +++ b/modules/luci-base/luasrc/view/cbi/value.htm @@ -29,7 +29,7 @@ <%- end -%>'); <%- end %> <% if self.datatype then -%> - cbi_validate_field('<%=cbid%>', <%=tostring((self.optional or self.rmempty) == true)%>, '<%=self.datatype:gsub("'", "\\'")%>'); + cbi_validate_field('<%=cbid%>', <%=tostring((self.optional or self.rmempty) == true)%>, '<%=self.datatype:gsub("\\", "\\\\"):gsub("'", "\\'")%>'); <%- end %> //]]></script> <% end -%> |