* Remove characters not allowed in file names for major OSes.
(name)
| 75 | * Remove characters not allowed in file names for major OSes. |
| 76 | */ |
| 77 | function sanitizeDownloadFilename(name) { |
| 78 | return name |
| 79 | .replace(/[\\/:*?"<>|\u0000-\u001F]/g, " ") // reserved + control |
| 80 | .replace(/\s+/g, " ") // collapse spaces |
| 81 | .trim(); |
| 82 | } |
| 83 | |
| 84 | /** |
| 85 | * Build filename using the selected format ID and runtime values. |
no outgoing calls
no test coverage detected