libs/web: implement rawhtml property for DummyValue switches, allowes passing arbrita...
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 8 Nov 2010 18:13:40 +0000 (18:13 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 8 Nov 2010 18:13:40 +0000 (18:13 +0000)
libs/web/luasrc/view/cbi/dvalue.htm

index 9745fff..7377348 100644 (file)
@@ -15,7 +15,14 @@ $Id$
 
 <%+cbi/valueheader%>
 <% if self.href then %><a href="<%=self.href%>"><% end -%>
-       <%=pcdata(self:cfgvalue(section) or self.default or "")%>
+       <%
+               local val = self:cfgvalue(section) or self.default or ""
+               if not self.rawhtml then
+                       write(pcdata(val))
+               else
+                       write(val)
+               end
+       %>
 <%- if self.href then %></a><%end%>
 &#160;
 <input type="hidden" id="<%=cbid%>" value="<%=pcdata(self:cfgvalue(section) or self.default or "")%>" />