Extra check to avoid infinite loop

main2
Bob Mottram 2019-10-09 19:41:19 +01:00
parent dc135f49c0
commit 6e51317ce5
1 changed files with 3 additions and 0 deletions

View File

@ -1640,7 +1640,10 @@ def addEmojiToDisplayName(baseDir: str,httpPrefix: str, \
if '://' in displayName:
break
emojiStr=displayName.split(':')[1]
prevDisplayName=displayName
displayName=displayName.replace(':'+emojiStr+':','').strip()
if prevDisplayName==displayName:
break
print('TAG: displayName after tags 3: '+displayName)
print('TAG: displayName after tag replacements: '+displayName)
return displayName