mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🐛 Repeated escaping in preview area when searching for matching doc blocks https://github.com/siyuan-note/siyuan/issues/10219
This commit is contained in:
parent
c68396a687
commit
a9092ce18d
2 changed files with 10 additions and 3 deletions
|
|
@ -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, "&") {
|
||||
return s
|
||||
}
|
||||
|
||||
if strings.ContainsAny(s, "<>\"'&") {
|
||||
return html.EscapeString(s)
|
||||
}
|
||||
return s
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue