1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-23 00:03:33 +00:00

Improved sanitize function to replace apostrophe and backticks

This commit is contained in:
Bruno Maia 2021-11-30 01:15:14 +00:00 committed by GitHub
parent d8fffe8e52
commit 592dc799e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,7 +25,7 @@ def sanitize(string, ignore_characters=None, default_characters={'-', ':', '(',
string = re.sub(r'[%s]' % re.escape(''.join(characters)), ' ', string)
# remove some characters
characters = {'\''} - ignore_characters
characters = {'\'', '´', '`', ''} - ignore_characters
if characters:
string = re.sub(r'[%s]' % re.escape(''.join(characters)), '', string)