From e4f77ace8b4fe9fd4c5d73e604eb1b8c6b480ed8 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Mon, 7 May 2018 22:07:15 +0800 Subject: luci-app-commands: fix link generation Fixes openwrt/luci##824 Signed-off-by: Yousong Zhou --- applications/luci-app-commands/luasrc/view/commands.htm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'applications/luci-app-commands/luasrc') diff --git a/applications/luci-app-commands/luasrc/view/commands.htm b/applications/luci-app-commands/luasrc/view/commands.htm index 3b361558ee..4285f25cb2 100644 --- a/applications/luci-app-commands/luasrc/view/commands.htm +++ b/applications/luci-app-commands/luasrc/view/commands.htm @@ -108,9 +108,7 @@ if (legend && output) { - var prefix = location.protocol + '//' + location.hostname + - (location.port ? ':' + location.port : '') + - location.pathname.split(';')[0] + 'command/'; + var prefix = location.protocol + '//' + location.host + '<%=url('command')%>/'; var suffix = (args ? '/' + args : ''); var link = prefix + id + suffix; -- cgit v1.2.3