From: Jo-Philipp Wich Date: Mon, 8 Nov 2010 18:13:40 +0000 (+0000) Subject: libs/web: implement rawhtml property for DummyValue switches, allowes passing arbrita... X-Git-Tag: 0.10.0~512 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=16262c2be04e035f3403fddac6144272092e8dc0 libs/web: implement rawhtml property for DummyValue switches, allowes passing arbritary markup --- diff --git a/libs/web/luasrc/view/cbi/dvalue.htm b/libs/web/luasrc/view/cbi/dvalue.htm index 9745fff4c..7377348fe 100644 --- a/libs/web/luasrc/view/cbi/dvalue.htm +++ b/libs/web/luasrc/view/cbi/dvalue.htm @@ -15,7 +15,14 @@ $Id$ <%+cbi/valueheader%> <% if self.href then %><% 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 %><%end%>   " />