Some more escaping
authorSteven Barth <steven@midlink.org>
Fri, 15 Aug 2008 18:26:32 +0000 (18:26 +0000)
committerSteven Barth <steven@midlink.org>
Fri, 15 Aug 2008 18:26:32 +0000 (18:26 +0000)
libs/cbi/luasrc/view/cbi/dvalue.htm
libs/cbi/luasrc/view/cbi/lvalue.htm

index 7d22fe0..bdcbd31 100644 (file)
@@ -16,12 +16,12 @@ $Id$
 <%+cbi/valueheader%>
 <% if self.value then
        if type(self.value) == "function" then %>
-       <%=self:value(section)%>
+       <%=luci.util.pcdata(self:value(section))%>
 <% else %>
-       <%=self.value%>
+       <%=luci.util.pcdata(self.value)%>
 <%     end
 else %>
-       <%=self:cfgvalue(section)%>
+       <%=luci.util.pcdata(self:cfgvalue(section))%>
 <% end %>
 &nbsp;
 <%+cbi/valuefooter%>
index cb41f53..5108e85 100644 (file)
@@ -16,7 +16,7 @@ $Id$
 <% if self.widget == "select" then %>
        <select onchange="cbi_d_update(this.id)"<%= attr("id", cbid) .. attr("name", cbid) .. ifattr(self.size, "size") %>>
        <% for i, key in pairs(self.keylist) do -%>
-               <option<%= attr("value", key) .. ifattr(self:cfgvalue(section) == key, "selected", "selected") %>><%=self.vallist[i]%></option>
+               <option<%= attr("value", key) .. ifattr(self:cfgvalue(section) == key, "selected", "selected") %>><%=luci.util.pcdata(self.vallist[i])%></option>
        <%- end %>
        </select>
 <% elseif self.widget == "radio" then