diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-04-15 14:31:04 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-04-15 14:31:04 +0000 |
commit | fd28386e35a947cf9966ae6fd8d2dd5673279bad (patch) | |
tree | 18629b2216f7987349b56d5de55a4a43b38b045f /libs | |
parent | 23adee586a9f117a55c71fc34b74025b6686ed15 (diff) |
libs/web: fix html output for complex datatypes containing apostrophes
Diffstat (limited to 'libs')
-rw-r--r-- | libs/web/luasrc/view/cbi/value.htm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/web/luasrc/view/cbi/value.htm b/libs/web/luasrc/view/cbi/value.htm index 180b16048..19715a579 100644 --- a/libs/web/luasrc/view/cbi/value.htm +++ b/libs/web/luasrc/view/cbi/value.htm @@ -5,7 +5,7 @@ %> /> <% if self.password then %><img src="<%=resource%>/cbi/reload.gif" style="vertical-align:middle" title="<%:Reveal/hide password%>" onclick="var e = document.getElementById('<%=cbid%>'); e.type = (e.type=='password') ? 'text' : 'password';" /><% end %> <% if #self.keylist > 0 or self.datatype then -%> - <script type="text/javascript"> + <script type="text/javascript">//<![CDATA[ <% if #self.keylist > 0 then -%> cbi_combobox_init('<%=cbid%>', { <%- @@ -26,8 +26,8 @@ <%- end -%>'); <%- end %> <% if self.datatype then -%> - cbi_validate_field('<%=cbid%>', <%=tostring((self.optional or self.rmempty) == true)%>, '<%=self.datatype%>'); + cbi_validate_field('<%=cbid%>', <%=tostring((self.optional or self.rmempty) == true)%>, '<%=self.datatype:gsub("'", "\\'")%>'); <%- end %> - </script> + //]]></script> <% end -%> <%+cbi/valuefooter%> |