allow spaces in filename
but replace newline and tab characters
This commit is contained in:
@@ -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('_')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user