Commit edc004f2be1db7683213bfc0986839b535a3698c
Committed by
GitHub
Merge pull request #855 from xambroz/patch-2
oleobj.py syntax error
Showing
1 changed file
with
1 additions
and
1 deletions
oletools/oleobj.py
| ... | ... | @@ -534,7 +534,7 @@ def sanitize_filename(filename, replacement='_', |
| 534 | 534 | Might return empty string |
| 535 | 535 | """ |
| 536 | 536 | basepath = os.path.basename(filename).strip() |
| 537 | - sane_fname = re.sub(u'[^a-zA-Z0-9.\-_ ]', replacement, basepath) | |
| 537 | + sane_fname = re.sub(u'[^a-zA-Z0-9._ -]', replacement, basepath) | |
| 538 | 538 | sane_fname = str(sane_fname) # py3: does nothing; py2: unicode --> str |
| 539 | 539 | |
| 540 | 540 | while ".." in sane_fname: | ... | ... |