fix: actually accept urls that kinda look like an url

master
phga 3 years ago
parent 6af8b87dd4
commit 0aad1a95e5

@ -76,8 +76,7 @@ func handleLinkList(w http.ResponseWriter, r *http.Request) {
url := r.PostForm.Get("url") url := r.PostForm.Get("url")
desc := r.PostForm.Get("description") desc := r.PostForm.Get("description")
if !strings.HasPrefix(url, "http://") || if !strings.HasPrefix(url, "http") {
!strings.HasPrefix(url, "https://") {
url = "https://" + url url = "https://" + url
} }

Loading…
Cancel
Save