This commit is contained in:
Liang Ding 2023-05-15 14:56:12 +08:00
parent 7dbfa43de4
commit 0a10285167
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
7 changed files with 14 additions and 8 deletions

View file

@ -36,6 +36,7 @@ import (
"github.com/88250/gulu"
"github.com/88250/lute"
"github.com/88250/lute/ast"
"github.com/88250/lute/html"
"github.com/88250/lute/parse"
"github.com/88250/lute/render"
"github.com/dustin/go-humanize"
@ -811,7 +812,7 @@ func IndexRepo(memo string) (err error) {
eventbus.CtxPushMsg: eventbus.CtxPushMsgToStatusBarAndProgress,
})
if nil != err {
util.PushStatusBar("Index data repo failed: " + err.Error())
util.PushStatusBar("Index data repo failed: " + html.EscapeString(err.Error()))
return
}
elapsed := time.Since(start)
@ -992,7 +993,7 @@ func bootSyncRepo() (err error) {
autoSyncErrCount++
planSyncAfter(fixSyncInterval)
msg := fmt.Sprintf("sync repo failed: %s", err)
msg := fmt.Sprintf("sync repo failed: %s", html.EscapeString(err.Error()))
logging.LogErrorf(msg)
util.PushStatusBar(msg)
util.PushErrMsg(msg, 0)