Updates gophermap rendering to support gemini urls as h URL:... style links

This commit is contained in:
sloumdrone 2019-09-18 22:03:19 -07:00
parent 7e4a32c67a
commit 5114ac1a15
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ func buildLink(host, port, gtype, resource string) string {
case "h": case "h":
u, tf := isWebLink(resource) u, tf := isWebLink(resource)
if tf { if tf {
if len(u) > 4 && string(u[:4]) == "http" { if strings.Index(u, "://") > 0 {
return u return u
} else { } else {
return fmt.Sprintf("http://%s", u) return fmt.Sprintf("http://%s", u)