diff --git a/files/routes/posts.py b/files/routes/posts.py index 026e839fa5..1788e01cdd 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -381,6 +381,10 @@ def filter_title(title): if path.isfile(f'./files/assets/images/emojis/{i.group(1)}.webp'): title = title.replace(f':{i.group(1)}:', f'') + for i in re.finditer('!(.{1,30}?)!', title): + if path.isfile(f'./files/assets/images/emojis/{i.group(1)}.webp'): + title = title.replace(f'!{i.group(1)}!', f'') + return title