fix(application-form-fill): 清洗填表Word文件名
This commit is contained in:
@@ -107,5 +107,6 @@ def _normalize_label(value: str) -> str:
|
||||
|
||||
|
||||
def _safe_filename(value: str) -> str:
|
||||
text = re.sub(r'[\\/:*?"<>|]+', "_", value or "")
|
||||
text = re.sub(r"[\x00-\x1f\x7f]+", "", value or "")
|
||||
text = re.sub(r'[\\/:*?"<>|]+', "_", text)
|
||||
return text.strip()[:80] or "output"
|
||||
|
||||
Reference in New Issue
Block a user