Replace more ascii codes

master
azzy9 5 months ago
parent 16d1baccc8
commit 74cf98a0f3

@ -157,8 +157,11 @@ def clean_text( text ):
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''', '')
if r'&' in text:
text = text.replace(r'&', '&')
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