forked from indymedia/epicyon
Extra emoji checks
parent
caf3c31472
commit
691b14a3e7
13
content.py
13
content.py
|
@ -62,12 +62,13 @@ def replaceEmojiFromTags(content: str,tag: [],messageType: str) -> str:
|
||||||
continue
|
continue
|
||||||
iconName=tagItem['icon']['url'].split('/')[-1]
|
iconName=tagItem['icon']['url'].split('/')[-1]
|
||||||
if iconName:
|
if iconName:
|
||||||
if iconName.startswith('1'):
|
if len(iconName)>1:
|
||||||
if '.' in iconName:
|
if iconName[0].isdigit():
|
||||||
iconName=iconName.split('.')[0]
|
if '.' in iconName and '-' not in iconName:
|
||||||
content= \
|
iconName=iconName.split('.')[0]
|
||||||
content.replace(tagItem['name'], \
|
content= \
|
||||||
chr(int("0x"+iconName,16)))
|
content.replace(tagItem['name'], \
|
||||||
|
chr(int("0x"+iconName,16)))
|
||||||
htmlClass='emoji'
|
htmlClass='emoji'
|
||||||
if messageType=='post header':
|
if messageType=='post header':
|
||||||
htmlClass='emojiheader'
|
htmlClass='emojiheader'
|
||||||
|
|
Loading…
Reference in New Issue