🐛 搜索结果未转义导致脚本执行或白屏 Fix https://github.com/siyuan-note/siyuan/issues/5492

This commit is contained in:
Liang Ding 2022-07-21 23:20:39 +08:00
parent e86e8e242f
commit c2caef8d49
No known key found for this signature in database
GPG Key ID: 136F30F901A2231D

View File

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