From 1908d9715c9242780b1abef465cc3543a92591b2 Mon Sep 17 00:00:00 2001 From: YouROK <8yourok8@mail.ru> Date: Mon, 1 Mar 2021 00:04:21 +0300 Subject: [PATCH] add replace & -> & in add link --- server/web/api/torrents.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/web/api/torrents.go b/server/web/api/torrents.go index d9cb5bc..977425d 100644 --- a/server/web/api/torrents.go +++ b/server/web/api/torrents.go @@ -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)