🐛 Repeated escaping in preview area when searching for matching doc blocks https://github.com/siyuan-note/siyuan/issues/10219

This commit is contained in:
Daniel 2024-01-19 17:53:21 +08:00
parent c68396a687
commit a9092ce18d
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 10 additions and 3 deletions

View file

@ -43,7 +43,11 @@ func RemoveElem[T any](s []T, index int) []T {
}
func EscapeHTML(s string) string {
if strings.ContainsAny(s, "<>\"'") {
if strings.Contains(s, "&amp;") {
return s
}
if strings.ContainsAny(s, "<>\"'&") {
return html.EscapeString(s)
}
return s