8.2.7.5. _encode_file_name

_encode_file_name(s, short_name=None)[source]

Take a string and return a valid filename constructed from the string.

Uses a whitelist approach: any characters not present in valid_chars are removed. Also spaces are replaced with underscores.