替换转义字符

This commit is contained in:
2025-10-11 16:07:27 +08:00
parent b10eaf5133
commit 5614f678bd

View File

@@ -74,7 +74,7 @@ var safePropertyRE = regexp.MustCompile(
`|\\u[0-9a-fA-F]{4}` + // Unicode 4位转义
`|\\[tnrfbv\\]` + // 转义字面量
`|[\x00-\x1F\x7F-\x9F]` + // ASCII + C1 控制字符
`|[\u200B-\u200D\uFEFF]`, // 零宽字符
`|[\\u200B-\\u200D\\uFEFF]`, // 零宽字符
)
func safeProperty(property map[string]any) {