fix: standardize version parsing and simplify string escaping

This commit is contained in:
手瓜一十雪 committed 2026-10-18 13:00:39 +08:00
1 parent 4e2b6b1200
commit 38a7c3da63
23 files changed
+245 -137

No files matched your search

+4 -4
View File
@@ -69,10 +69,10 @@ export function parseCQParams(raw: string): Record<string, string> {
if (eq > 0) {
params[pair.substring(0, eq)] = pair
.substring(eq + 1)
.replace(/&#91;/g, '[')
.replace(/&#93;/g, ']')
.replace(/&#44;/g, ',')
.replace(/&amp;/g, '&');
.replaceAll('&#91;', '[')
.replaceAll('&#93;', ']')
.replaceAll('&#44;', ',')
.replaceAll('&amp;', '&');
}
}