Update ReplaceIllegalCharactersInPath to handle quirks in HFS+ and VFAT
- Re-introduces U+200C and U+200D as illegal characters since these are
ignored on HFS+ and can interfere with filename sanitization. All code
points in the Cf general category are now considered illegal in a
- Leading and trailing WSpace and '.' characters are now considered
- Due to being confused for short names on VFAT filesystems, the tilde
('~') is now considered illegal.
- Prior to this change, only ASCII whitespace were trimmed from
filenames on Mac OSX. All UTF-8 encoded WSpace characters are now
handled on Mac OSX.
- Instead of trimming leading and trailing whitespace, they are now
replaced by the replacement character. Trimming could cause a
previously hidden extension or basename to be exposed.
Review URL: https://codereview.chromium.org/869823003
6 files changed