luci-base: fix escaping lua string to js repr
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
This commit is contained in:
parent
9b30357454
commit
862b84feb2
1 changed files with 1 additions and 1 deletions
|
@ -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 -%>
|
||||
|
|
Loading…
Reference in a new issue