Skip to content

Commit

Permalink
fixed broken link to protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
bengarrett committed Jun 16, 2024
1 parent 6306eef commit d8e6a1f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion handler/app/dirs.go
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,9 @@ func artifactRelations(art *models.File) template.HTML {
continue
}
name, href := x[0], x[1]
if !strings.HasPrefix(href, "http") {
href = "https://" + href
}
rows += fmt.Sprintf("<tr><th scope=\"row\"><small>Link to</small></th>"+
"<td><small><a class=\"text-truncate\" href=\"%s\">%s</a></small></td></tr>", href, name)
}
Expand All @@ -647,9 +650,12 @@ func artifactWebsites(art *models.File) template.HTML {
continue
}
name, href := x[0], x[1]
if !strings.HasPrefix(href, "http") {
href = "https://" + href
}
rows += fmt.Sprintf("<tr><th scope=\"row\"><small>Link to</small></th>"+
"<td><small><a class=\"link-offset-3 icon-link icon-link-hover\" "+
"href=\"https://%s\">%s %s</a></small></td></tr>", href, name, LinkSVG())
"href=\"%s\">%s %s</a></small></td></tr>", href, name, LinkSVG())
}
return template.HTML(rows)
}
Expand Down

0 comments on commit d8e6a1f

Please sign in to comment.