* luci/themes: fix xml errors triggered by query strings in menu entries
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 16 Sep 2008 01:14:30 +0000 (01:14 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 16 Sep 2008 01:14:30 +0000 (01:14 +0000)
* luci/app-olsr: fix html error in mid table

applications/luci-olsr/luasrc/view/status-olsr/mid.htm
themes/fledermaus/luasrc/view/themes/fledermaus/header.htm
themes/openwrt-light/luasrc/view/themes/openwrt-light/header.htm
themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm

index f7ad682fd6c3ce1c3acdeb6bf7872c7b5af0ca30..1d0bef73968b2a27ac9f6829c3c9fab5193ca9cc 100644 (file)
@@ -14,7 +14,7 @@ $Id$
 -%>
 <%+header%>
 <h1><%:olsrd_mid%></h1>
-<p><%:olsrd_mid_desc%></h1>
+<p><%:olsrd_mid_desc%></p>
 <br />
 <table class="smalltext" cellspacing="0" cellpadding="6">
 <tr>
index ff5dd90e5e96701b7cae67a985999845289414c4..d93d9aee3b631eef32469814e8cab95178836ada 100644 (file)
@@ -55,7 +55,7 @@ require("luci.http").prepare_content("text/html")
 
                                var lis  = document.getElementById("mainmenu").getElementsByTagName("LI");
                                var divs = document.getElementById("mainmenu").getElementsByTagName("DIV");
-                               
+
                                for( var i = 0; i < lis.length;  i++ ) ie_hover( lis[i]  );
                                for( var i = 0; i < divs.length; i++ ) ie_hover( divs[i] );
                        }
@@ -110,7 +110,7 @@ local function submenu(prefix, node)
                        href = (nnode.query) and href .. luci.http.build_querystring(nnode.query) or href
                %>
                <li>
-                       <span<% if nnode._menu_selected then %> class="active"<%end%>><a href="<%=href%>"><%=nnode.title%></a></span>
+                       <span<% if nnode._menu_selected then %> class="active"<%end%>><a href="<%=luci.util.pcdata(href)%>"><%=nnode.title%></a></span>
                        <%- submenu(prefix .. v.name .. "/", nnode) %>
                </li>
                <%- end %>
@@ -154,7 +154,7 @@ end
        <%
                if tree.nodes[category] and tree.nodes[category].ucidata then
                        local ucic = 0
-                       
+
                        for i, j in pairs(require("luci.model.uci").cursor():changes()) do
                                for k, l in pairs(j) do
                                        for m, n in pairs(l) do
index 356ae369b19855327400a0ee29ed7152af7374ae..31b1ad017537a31de6a7a184f4e31b0dd51be0d9 100644 (file)
@@ -55,7 +55,7 @@ require("luci.http").prepare_content("text/html")
 
                                var lis  = document.getElementById("mainmenu").getElementsByTagName("LI");
                                var divs = document.getElementById("mainmenu").getElementsByTagName("DIV");
-                               
+
                                for( var i = 0; i < lis.length;  i++ ) ie_hover( lis[i]  );
                                for( var i = 0; i < divs.length; i++ ) ie_hover( divs[i] );
                        }
@@ -117,7 +117,7 @@ local function submenu(prefix, node)
                        href = (nnode.query) and href .. luci.http.build_querystring(nnode.query) or href
                %>
                <li>
-                       <span<% if nnode._menu_selected then %> class="active"<%end%>><a href="<%=href%>"><%=nnode.title%></a></span>
+                       <span<% if nnode._menu_selected then %> class="active"<%end%>><a href="<%=luci.util.pcdata(href)%>"><%=nnode.title%></a></span>
                        <%- submenu(prefix .. v.name .. "/", nnode) %>
                </li>
                <%- end %>
index e8b3d5533bfe19eaf6f538d62cce7e96c243d212..6e460d5b0346336f638a2fd382b906e843070dde 100644 (file)
@@ -55,7 +55,7 @@ require("luci.http").prepare_content("application/xhtml+xml")
 
                                var lis  = document.getElementById("mainmenu").getElementsByTagName("LI");
                                var divs = document.getElementById("mainmenu").getElementsByTagName("DIV");
-                               
+
                                for( var i = 0; i < lis.length;  i++ ) ie_hover( lis[i]  );
                                for( var i = 0; i < divs.length; i++ ) ie_hover( divs[i] );
                        }
@@ -118,7 +118,7 @@ local function submenu(prefix, node)
                        href = (nnode.query) and href .. luci.http.build_querystring(nnode.query) or href
                %>
                <li>
-                       <span<% if nnode._menu_selected then %> class="active"<%end%>><a href="<%=href%>"><%=nnode.title%></a></span>
+                       <span<% if nnode._menu_selected then %> class="active"<%end%>><a href="<%=luci.util.pcdata(href)%>"><%=nnode.title%></a></span>
                        <%- submenu(prefix .. v.name .. "/", nnode) %>
                </li>
                <%- end %>