telegram: optimize regular expression for sanitize filenames
patch 6bc0aa52a10f9031c5334801deaeba2b6ac0d2b0
Author: E. Bosch <presidev@AT@gmail.com>
Date: Sat Feb 5 18:21:05 CET 2022
* telegram: optimize regular expression for sanitize filenames
hunk ./telegram.py 18
+FILENAME_INVALID_CHARS = re.compile('[/{}<>()"\'\\|&]')
hunk ./utils.py 47
- return re.sub('[/{}<>()"\'\\|&]', '', fn).strip('-').replace(' ','_')
+ return FILENAME_INVALID_CHARS.sub('', fn).strip('-').replace(' ','_')