From d39c38b5a8f8d69facecf55ba1fc58e14ede6668 Mon Sep 17 00:00:00 2001 From: Feuerfuchs Date: Tue, 12 Nov 2019 14:45:01 +0100 Subject: Handle links starting with /URL: correctly --- gopherproxy.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gopherproxy.go b/gopherproxy.go index c91afdf..87a1ad0 100644 --- a/gopherproxy.go +++ b/gopherproxy.go @@ -63,6 +63,8 @@ func renderDirectory(w http.ResponseWriter, tpl *template.Template, assetList As if strings.HasPrefix(x.Selector, "URL:") { tr.Link = template.URL(x.Selector[4:]) + } else if strings.HasPrefix(x.Selector, "/URL:") { + tr.Link = template.URL(x.Selector[5:]) } else { var hostport string if x.Port == 70 { -- cgit v1.2.3-54-g00ecf