Skip to content

Commit 93f2276

Browse files
committed
🐛 Protyle Incorrect copy content for a list item with a specific custom attribute value siyuan-note/siyuan#8707
1 parent 3dbceb5 commit 93f2276

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

html/escape_encode.go

+4
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,16 @@ var (
2828

2929
func UnescapeAttrVal(v string) string {
3030
v = strings.ReplaceAll(v, editor.IALValEscNewLine, "\n")
31+
v = strings.ReplaceAll(v, "{", "{")
32+
v = strings.ReplaceAll(v, "}", "}")
3133
return UnescapeString(v)
3234
}
3335

3436
func EscapeAttrVal(v string) (ret string) {
3537
ret = string(EscapeHTML([]byte(v)))
3638
ret = strings.ReplaceAll(ret, "\n", editor.IALValEscNewLine)
39+
ret = strings.ReplaceAll(ret, "{", "{")
40+
ret = strings.ReplaceAll(ret, "}", "}")
3741
return
3842
}
3943

0 commit comments

Comments
 (0)