diff --git a/Makefile b/Makefile index 0d339dee..83fc28eb 100644 --- a/Makefile +++ b/Makefile @@ -24,8 +24,6 @@ build: clear ./make_version.sh go build -race -o $(FILEAPP) $(FILEMAIN) - cd ./cmd && \ - ./VersionToFile.py lint: clear go fmt ./... diff --git a/telegram_bot/telegram_bot.go b/telegram_bot/telegram_bot.go index 6c0992dc..26471682 100644 --- a/telegram_bot/telegram_bot.go +++ b/telegram_bot/telegram_bot.go @@ -8,6 +8,7 @@ import ( "github.com/ManyakRus/starter/micro" "github.com/ManyakRus/starter/stopapp" botapi "github.com/go-telegram-bot-api/telegram-bot-api/v5" + "html" "os" "sync" ) @@ -141,6 +142,10 @@ func SendMessage(UserName string, Text string) (int, error) { var ID int var err error + //экранируем запрещённые символы + Text = html.EscapeString(Text) + + // msg := botapi.NewMessageToChannel(UserName, Text) msg.ParseMode = "HTML"