Commit 3554ff77 authored by Michal Hrusecky's avatar Michal Hrusecky 🦎

Fix links to IPv6 addresses

parent 47d55bef
......@@ -58,7 +58,11 @@ function render_entry(data) {
table += '<td data-sort-value="' + data[y] + '" title="' + data[y] + '">' + shorten(data[y]) +
'<a href="#" onClick="add_hostname_filter(\'' + data[y] + '\')"><i class="fas fa-search"/></a>';
if(data[4] == 'http' || data[4] == 'https') {
table += '<a href="' + data[4] + '://' + data[y] + '" target="_blank_"><i class="fas fa-external-link-alt"/></a>';
let url=data[y];
if(url.match(/:.*:/)) {
url = '[' + url + ']';
}
table += '<a href="' + data[4] + '://' + url + '" target="_blank_"><i class="fas fa-external-link-alt"/></a>';
}
table += '</td>';
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment