treewide: improve handling of page redirections in uci change views
[project/luci.git] / themes / luci-theme-freifunk-generic / luasrc / view / themes / freifunk-generic / header.htm
index 342a9d4..8185655 100644 (file)
@@ -205,7 +205,7 @@ if tree.nodes[category] and tree.nodes[category].ucidata then
 -%>
        <div id="savemenu">
                <% if ucic > 0 then %>
-                       <a class="warning" href="<%=controller%>/<%=category%>/uci/changes/?redir=<%=http.urlencode(http.formvalue("redir") or REQUEST_URI)%>"><%:Unsaved Changes%>: <%=ucic%></a>
+                       <a class="warning" href="<%=controller%>/<%=category%>/uci/changes/?redir=<%=http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/"))%>"><%:Unsaved Changes%>: <%=ucic%></a>
                <% end -%>
        </div>
 <% end %>