diff --git a/content.py b/content.py index 7795250e..31090fc1 100644 --- a/content.py +++ b/content.py @@ -62,12 +62,13 @@ def replaceEmojiFromTags(content: str,tag: [],messageType: str) -> str: continue iconName=tagItem['icon']['url'].split('/')[-1] if iconName: - if iconName.startswith('1'): - if '.' in iconName: - iconName=iconName.split('.')[0] - content= \ - content.replace(tagItem['name'], \ - chr(int("0x"+iconName,16))) + if len(iconName)>1: + if iconName[0].isdigit(): + if '.' in iconName and '-' not in iconName: + iconName=iconName.split('.')[0] + content= \ + content.replace(tagItem['name'], \ + chr(int("0x"+iconName,16))) htmlClass='emoji' if messageType=='post header': htmlClass='emojiheader'