add replace & -> & in add link

This commit is contained in:
YouROK
2021-03-01 00:04:21 +03:00
parent 8bac1778c7
commit 1908d9715c

View File

@@ -2,6 +2,7 @@ package api
import (
"net/http"
"strings"
"server/log"
"server/torr"
@@ -62,6 +63,7 @@ func addTorrent(req torrReqJS, c *gin.Context) {
}
log.TLogln("add torrent", req.Link)
req.Link = strings.ReplaceAll(req.Link, "&", "&")
torrSpec, err := utils.ParseLink(req.Link)
if err != nil {
log.TLogln("error add torrent:", err)