expand clean text method

master
azzy9 5 months ago
parent dda59cce61
commit e896fb686d

@ -155,4 +155,10 @@ def clean_text( text ):
""" Removes characters that can cause trouble """
return text.encode('ascii', 'ignore').decode('ascii').strip()
text = text.encode('ascii', 'ignore').decode('ascii').strip()
if r'&#' in text:
# replace common ascii codes, will expand if needed
text = text.replace(r'"', '"').replace(r'&', '&').replace(r''', '')
return text

Loading…
Cancel
Save