fix: actually accept urls that kinda look like an url
This commit is contained in:
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…
x
Reference in New Issue
Block a user