From b10eaf5133ece03c74814a1a4d46a133b544e454 Mon Sep 17 00:00:00 2001 From: yaodeshun Date: Sat, 11 Oct 2025 16:02:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=BF=87=E6=BB=A4=E5=AD=97?= =?UTF-8?q?=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/gamelog/sdk.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/package/gamelog/sdk.go b/package/gamelog/sdk.go index 8a2e31a..de71aad 100644 --- a/package/gamelog/sdk.go +++ b/package/gamelog/sdk.go @@ -68,7 +68,14 @@ var ( ) -var safePropertyRE = regexp.MustCompile(`["'\\\/]`) +var safePropertyRE = regexp.MustCompile( + `["'\\\/]` + + `|\\U[0-9a-fA-F]{8}` + // Unicode 8位转义 + `|\\u[0-9a-fA-F]{4}` + // Unicode 4位转义 + `|\\[tnrfbv\\]` + // 转义字面量 + `|[\x00-\x1F\x7F-\x9F]` + // ASCII + C1 控制字符 + `|[\u200B-\u200D\uFEFF]`, // 零宽字符 +) func safeProperty(property map[string]any) { for k, v := range property {