themes: entity fixes for theme headers
[project/luci.git] / themes / freifunk / luasrc / view / themes / freifunk / header.htm
index a0f7c63..30db92b 100644 (file)
@@ -85,14 +85,14 @@ require("luci.http").prepare_content("text/html")
 </div>
 
 <div class="pathbar separator black whitetext bold">
-<%:path%>: <%
+<%:Path%>: <%
 local c = tree
 local url = controller
 for k,v in pairs(request) do
        if c.nodes and c.nodes[v] then
                c = c.nodes[v]
                url = url .. "/" .. v
-       %><a href="<%=url%>"><%=c.title or v%></a> <% if k ~= #request then %>&#187; <% end
+       %><a href="<%=url%>"><%=pcdata(striptags(c.title or v))%></a> <% if k ~= #request then %>&#187; <% end
        end
 end
 %>
@@ -126,7 +126,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="<%=luci.util.pcdata(href)%>"><%=nnode.title%></a></span>
+                       <span<% if nnode._menu_selected then %> class="active"<%end%>><a href="<%=pcdata(href)%>"><%=pcdata(striptags(nnode.title))%></a></span>
                        <%- submenu(prefix .. v.name .. "/", nnode) %>
                </li>
                <%- end %>
@@ -149,7 +149,7 @@ if cattree and cattree.nodes then
                if not node.hidden and node.title and node.target then
                        local href = controller.."/"..category.."/"..k.name
                        href = (k.query) and href .. luci.http.build_querystring(k.query) or href %>
-                       <div<% if node._menu_selected then %> class="preactive"<%end%>><a href="<%=href%>"><%=node.title%></a>
+                       <div<% if node._menu_selected then %> class="preactive"<%end%>><a href="<%=pcdata(href)%>"><%=pcdata(striptags(node.title))%></a>
                                <%submenu("/" .. category .. "/" .. k.name .. "/", node)%>
                        </div>
 <%             end
@@ -161,7 +161,7 @@ end
                <ul><%
                        for k,node in pairs(tree.nodes) do
                                if node.title and not node.hidden then %>
-                                       <li<% if request[1] == k then %> class="active"<%end%>><a href="<%=controller%>/<%=k%>"><%=node.title%></a></li>
+                                       <li<% if request[1] == k then %> class="active"<%end%>><a href="<%=controller%>/<%=k%>"><%=pcdata(node.title)%></a></li>
 <%                             end
                        end%>
                </ul>
@@ -182,10 +182,10 @@ end
        <div class="mainmenu" style="float:right; margin-right:2em">
                <div>
                        <% if ucic > 0 then %>
-                       <a class="warning" href="<%=controller%>/<%=category%>/uci/changes"><%:unsavedchanges%>: <%=ucic%></a>
+                       <a class="warning" href="<%=controller%>/<%=category%>/uci/changes"><%:Unsaved Changes%>: <%=ucic%></a>
                        <% submenu("/" .. category .. "/uci/", tree.nodes[category].nodes["uci"]) -%>
                        <% else %>
-                       <a href="#"><%:changes%>: 0</a>
+                       <a href="#"><%:Changes%>: 0</a>
                        <% end %>
                </div>
        </div>
@@ -193,4 +193,4 @@ end
 
        <br class="clear" />
 </div>
-<div id="content">
+<div id="maincontent">