Remove exclamation mark in --restrict-filenames mode
[youtube-dl] / youtube_dl / utils.py
index 4ace22c2fc232ecacef491fd6ac6ecbd0ca3df01..a0c41081acb10b48c052b8c2d0eb79de8cc4eb0a 100644 (file)
@@ -208,7 +208,7 @@ def sanitize_filename(s, restricted=False):
                        return '_-' if restricted else ' -'
                elif char in '\\/|*<>':
                        return '_'
-               if restricted and (char in '&\'' or char.isspace()):
+               if restricted and (char in '!&\'' or char.isspace()):
                        return '_'
                if restricted and ord(char) > 127:
                        return '_'
@@ -316,7 +316,7 @@ class ContentTooShortError(Exception):
 
 class Trouble(Exception):
        """Trouble helper exception
-       
+
        This is an exception to be handled with
        FileDownloader.trouble
        """