fix: upf 5002 mml issue incompelete

This commit is contained in:
2024-04-12 18:10:51 +08:00
parent b2ddb7eb2b
commit 35a4f8b095

View File

@@ -172,7 +172,7 @@ func PostMML2ToNF(w http.ResponseWriter, r *http.Request) {
//re2 := regexp.MustCompile(`\x00`) // 匹配空字符
re2 := regexp.MustCompile(`[\x00-\x08\x0B\x0C\x0E-\x1F\x7F\x1B]`) // 匹配空字符和包含␛的控制字符
//re := regexp.MustCompile(`[\x00-\x1F\x7F]`)
result := re1.ReplaceAllString(string(buf[0:n-len(neType)-2]), "")
result := re1.ReplaceAllString(string(buf[0:n]), "")
result = re2.ReplaceAllString(result, "")
mmlResult = append(mmlResult, result)
}