Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luci-app-commands: fix incorrect url generation. #1244

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions applications/luci-app-commands/luasrc/view/commands.htm
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@
if (legend && output)
{
var prefix = location.protocol + '//' + location.hostname +
(location.port ? ':' + location.port : '') +
location.pathname.split(';')[0] + 'command/';
(location.port ? ':' + location.port : '') + '<%=url('command')%>/';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay. Please also sign off the commit as required by the CONTRIBUTING.md guide.

While at it, can you also tuck the ending slash / inside the url() call, like url('command/')? Thank you

var suffix = (args ? '/' + args : '');

var link = prefix + id + suffix;
Expand Down