projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b30357
)
luci-base: fix escaping lua string to js repr
author
Yousong Zhou
<yszhou4tech@gmail.com>
Wed, 25 Nov 2015 14:39:27 +0000
(22:39 +0800)
committer
Yousong Zhou
<yszhou4tech@gmail.com>
Wed, 2 Dec 2015 12:56:08 +0000
(20:56 +0800)
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
modules/luci-base/luasrc/view/cbi/value.htm
patch
|
blob
|
history
diff --git
a/modules/luci-base/luasrc/view/cbi/value.htm
b/modules/luci-base/luasrc/view/cbi/value.htm
index 8a08e08f2f4530364e46b6468424aa846b89e05e..c43dab5f4b49373a6368686d6f812f28afd48091 100644
(file)
--- 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 -%>