From 4173ea679e3d060ca15ced31412cd7f7c75a48e2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 21 Feb 2020 18:13:09 +0000 Subject: [PATCH] Exception handling --- content.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/content.py b/content.py index 31090fc19..5f2d2ca3d 100644 --- a/content.py +++ b/content.py @@ -66,9 +66,12 @@ def replaceEmojiFromTags(content: str,tag: [],messageType: str) -> str: 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))) + try: + content= \ + content.replace(tagItem['name'], \ + chr(int("0x"+iconName,16))) + except: + pass htmlClass='emoji' if messageType=='post header': htmlClass='emojiheader'