Closed fakuivan closed 7 years ago
What version of luci are you using? My <%=controller%>
adds a trailing slash.
LuCI 15.05-149-g0d8bbd2 Release (git-15.363.78009-956be55) / OpenWrt Chaos Calmer 15.05.1
I see. I guess even with a double slash it still works. I will accept the pull request. Thanks! 👍
Nice, at least in my vesion of luci, all references to <%=controller%>
are preceded by a slash.
root@router:/usr/lib/lua/luci/view# grep -r '<%=controller%>' ./
./admin_system/reboot.htm:<p><a href="<%=controller%>/admin/system/reboot?reboot=1"><%:Perform reboot%></a></p>
./admin_system/reboot.htm:<script type="text/javascript">setTimeout("location='<%=controller%>/admin'", 60000)</script>
./admin_uci/changes.htm: <form class="inline" method="get" action="<%=controller%>/admin/uci/apply">
./admin_uci/changes.htm: <form class="inline" method="get" action="<%=controller%>/admin/uci/saveapply">
./admin_uci/changes.htm: <form class="inline" method="get" action="<%=controller%>/admin/uci/revert">
./themes/bootstrap/footer.htm: <li<% if request[1] == r then %> class="active"<%end%>><a href="<%=controller%>/<%=r%>/"><%=striptags(translate(tree.nodes[r].title))%></a> <span class="divider">|</span></li>
./themes/bootstrap/header.htm: <a class="label notice" href="<%=controller%>/<%=category%>/uci/changes"><%:Unsaved Changes%>: <%=ucichanges%></a>
./wrtbwmon.htm: <a href="<%=controller%>/admin/network/usage_config">Configuration</a>```
The href
"<%=controller%>admin/network/usage_config"
should be formatted like"<%=controller%>/admin/network/usage_config"
on wrtbwmon.htm@L4