Sanitization details and limitations
masterThe sanitize function performs the following removals/replacements:
- Control characters:
0x00–0x1fand0x80–0x9f. - Reserved characters:
/,?,<,>,\,:,*,|, and". - Unix reserved filenames:
.and... - Windows trailing characters: Trailing periods and spaces.
- Windows reserved filenames:
CON,PRN,AUX,NUL,COM1throughCOM9, andLPT1throughLPT9.
Compatibility
- Supported: Modern Windows, OS X, and Unix file systems (
NTFS,ext, etc.). - Not Supported:
FAT8.3 filenames. - Length: The output is truncated to 255 bytes.