Skip to content

Commit

Permalink
Merge pull request #855 from xambroz/patch-2
Browse files Browse the repository at this point in the history
oleobj.py syntax error
  • Loading branch information
decalage2 committed May 28, 2024
2 parents 4093ece + 6b4c7b8 commit edc004f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oletools/oleobj.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ def sanitize_filename(filename, replacement='_',
Might return empty string
"""
basepath = os.path.basename(filename).strip()
sane_fname = re.sub(u'[^a-zA-Z0-9.\-_ ]', replacement, basepath)
sane_fname = re.sub(u'[^a-zA-Z0-9._ -]', replacement, basepath)
sane_fname = str(sane_fname) # py3: does nothing; py2: unicode --> str

while ".." in sane_fname:
Expand Down

0 comments on commit edc004f

Please sign in to comment.