mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-03-13 11:53:03 +00:00
Fix: escape HTML characters in tgbot start command (#3883)
This commit is contained in:
parent
59b695ba83
commit
96b8fe472c
1 changed files with 2 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"html"
|
||||||
"io"
|
"io"
|
||||||
"math/big"
|
"math/big"
|
||||||
"net"
|
"net"
|
||||||
|
|
@ -651,7 +652,7 @@ func (t *Tgbot) answerCommand(message *telego.Message, chatId int64, isAdmin boo
|
||||||
msg += t.I18nBot("tgbot.commands.help")
|
msg += t.I18nBot("tgbot.commands.help")
|
||||||
msg += t.I18nBot("tgbot.commands.pleaseChoose")
|
msg += t.I18nBot("tgbot.commands.pleaseChoose")
|
||||||
case "start":
|
case "start":
|
||||||
msg += t.I18nBot("tgbot.commands.start", "Firstname=="+message.From.FirstName)
|
msg += t.I18nBot("tgbot.commands.start", "Firstname=="+html.EscapeString(message.From.FirstName))
|
||||||
if isAdmin {
|
if isAdmin {
|
||||||
msg += t.I18nBot("tgbot.commands.welcome", "Hostname=="+hostname)
|
msg += t.I18nBot("tgbot.commands.welcome", "Hostname=="+hostname)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue