Compare commits

..

3 commits

Author SHA1 Message Date
MrTeeett
c57e3b021e
Merge cb83e57b2a into ccd223aeea 2026-03-04 14:29:58 +03:00
Happ-dev
ccd223aeea
Fix DeepLink for Happ, remove encoding URL (#3863)
Co-authored-by: y.sivushkin <y.sivushkin@corp.101xp.com>
2026-03-04 12:29:46 +01:00
Aleksei Sidorenko
96b8fe472c
Fix: escape HTML characters in tgbot start command (#3883) 2026-03-04 11:35:24 +01:00
3 changed files with 4 additions and 3 deletions

View file

@ -144,7 +144,7 @@
return this.app.subUrl; return this.app.subUrl;
}, },
happUrl() { happUrl() {
return `happ://add/${encodeURIComponent(this.app.subUrl)}`; return `happ://add/${this.app.subUrl}`;
} }
}, },
methods: { methods: {

View file

@ -206,7 +206,7 @@
<a-menu-item key="android-npvtunnel" @click="copy(app.subUrl)">NPV <a-menu-item key="android-npvtunnel" @click="copy(app.subUrl)">NPV
Tunnel</a-menu-item> Tunnel</a-menu-item>
<a-menu-item key="android-happ" <a-menu-item key="android-happ"
@click="open('happ://add/' + encodeURIComponent(app.subUrl))">Happ</a-menu-item> @click="open('happ://add/' + app.subUrl)">Happ</a-menu-item>
</a-menu> </a-menu>
</a-dropdown> </a-dropdown>
</a-col> </a-col>

View file

@ -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)
} }