From c2caef8d496c663eb6902f4b74e2475db7de8dc2 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 21 Jul 2022 23:20:39 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E6=90=9C=E7=B4=A2=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E6=9C=AA=E8=BD=AC=E4=B9=89=E5=AF=BC=E8=87=B4=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E6=88=96=E7=99=BD=E5=B1=8F=20Fix=20https://g?= =?UTF-8?q?ithub.com/siyuan-note/siyuan/issues/5492?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/search/mark.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/search/mark.go b/kernel/search/mark.go index 59a58399e..b3fd6234c 100644 --- a/kernel/search/mark.go +++ b/kernel/search/mark.go @@ -26,7 +26,7 @@ import ( func MarkText(text string, keyword string, beforeLen int, caseSensitive bool) (pos int, marked string) { if "" == keyword { - return -1, text + return -1, html.EscapeString(text) } text = html.EscapeString(text) keywords := SplitKeyword(keyword)