allow spaces in filename

but replace newline and tab characters
This commit is contained in:
Jan Bader
2026-04-08 21:57:41 +02:00
parent 5a3d60e45e
commit cf9b97699f

View File

@@ -226,7 +226,8 @@ def fill_invoice_fields(page: Page) -> None:
def sanitize_filename(name: str) -> str:
name = re.sub(r'[<>:"/\\|?*]', '_', name)
name = re.sub(r'\s+', '_', name)
name = re.sub(r'\t+', '_', name)
name = re.sub(r'\n+', '_', name)
return name.strip('_')