X-Git-Url: https://git.ao2.it/SaveMySugar/python3-savemysugar.git/blobdiff_plain/88fce7811221c360966eb3af691a719930a2514d..475721658d2f3e83eb323e19fde9570e9ebdbd45:/src/savemysugar/MorseTranslator.py diff --git a/src/savemysugar/MorseTranslator.py b/src/savemysugar/MorseTranslator.py index 8184829..630aba7 100755 --- a/src/savemysugar/MorseTranslator.py +++ b/src/savemysugar/MorseTranslator.py @@ -138,7 +138,7 @@ class MorseTranslator(object): def sanitize_text(self, text): sanitized = text.lower() - sanitized = re.sub(r"[^a-z0-9.,?\'\"/() \-=\+@]", "", sanitized) + sanitized = re.sub(r"[^a-z0-9.,:?\'-/()\"=\+@ ]", "", sanitized) sanitized = re.sub(r"\s+", " ", sanitized) sanitized = re.sub(r"^\s+", "", sanitized) sanitized = re.sub(r"\s+$", "", sanitized)