• Sanitizes a filename. Removes invalid characters and shortens to the max length.

    Parameters

    • filename: string
    • invalidCharacterRegex: RegExp
    • maxLength: number

    Returns string

    the sanitized filename