luci-theme-material: do not double escape menu titles
authorJo-Philipp Wich <jo@mein.io>
Thu, 27 Sep 2018 19:16:41 +0000 (21:16 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 27 Sep 2018 19:17:08 +0000 (21:17 +0200)
Fixes #1410.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
themes/luci-theme-material/luasrc/view/themes/material/header.htm

index 1f1df9c9add8f5aa7dba2330695e09190fa0ea1b..6d1e6efb45540a3cf5016dad9e3c3d861fccae97 100644 (file)
 
                        for i, r in ipairs(childs) do
                                local nnode = node.nodes[r]
-                               local title = pcdata(striptags(translate(nnode.title)))
+                               local title = striptags(translate(nnode.title))
 
                                write('<li><a data-title="%s" href="%s">%s</a></li>' %{
                                        title,
                                local grandchildren = disp.node_childs(nnode)
 
                                if #grandchildren > 0 then
-                                       local title = pcdata(striptags(translate(nnode.title)))
+                                       local title = striptags(translate(nnode.title))
 
                                        write('<li class="slide"><a class="menu" data-title="%s" href="#">%s</a>' %{
                                                title,
                                        render_submenu(category .. "/" .. r, nnode)
                                        write('</li>')
                                else
-                                       local title = pcdata(striptags(translate(nnode.title)))
+                                       local title = striptags(translate(nnode.title))
 
                                        write('<li><a data-title="%s" href="%s">%s</a></li>' %{
                                                title,