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

@ -29,6 +29,7 @@ import (
"time"
"github.com/88250/gulu"
"github.com/88250/lute/html"
"github.com/dustin/go-humanize"
"github.com/siyuan-note/logging"
)
@ -123,7 +124,7 @@ func Tesseract(imgAbsPath string) string {
ret := string(output)
ret = gulu.Str.RemoveInvisible(ret)
ret = RemoveRedundantSpace(ret)
msg := fmt.Sprintf("OCR [%s] [%s]", info.Name(), ret)
msg := fmt.Sprintf("OCR [%s] [%s]", html.EscapeString(info.Name()), html.EscapeString(ret))
PushStatusBar(msg)
return ret
}