MorseTranslator.py: fix sanitize_text
[SaveMySugar/python3-savemysugar.git] / src / savemysugar / MorseTranslator.py
index 8184829..630aba7 100755 (executable)
@@ -138,7 +138,7 @@ class MorseTranslator(object):
 
     def sanitize_text(self, text):
         sanitized = text.lower()
 
     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)
         sanitized = re.sub(r"\s+", " ", sanitized)
         sanitized = re.sub(r"^\s+", "", sanitized)
         sanitized = re.sub(r"\s+$", "", sanitized)