diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index c5f9dcac1..b99e83d42 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -202,7 +202,7 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False): classes = 'emoji-md' remoji = emoji - if random() < 0.01: classes += ' golden' + if random() < 0.01 and 'marsey' in emoji: classes += ' golden' if path.isfile(f'files/assets/images/emojis/{remoji}.webp'): new = re.sub(f'(?', new, flags=re.I) @@ -216,14 +216,14 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False): if emoji.startswith("!"): emoji = emoji[1:] classes = 'emoji mirrored' - if random() < 0.01: classes += ' golden' + if random() < 0.01 and 'marsey' in emoji: classes += ' golden' if path.isfile(f'files/assets/images/emojis/{emoji}.webp'): sanitized = re.sub(f'(?', sanitized, flags=re.I) if comment: marseys_used.add(emoji) elif path.isfile(f'files/assets/images/emojis/{emoji}.webp'): classes = 'emoji' - if random() < 0.01: classes += ' golden' + if random() < 0.01 and 'marsey' in emoji: classes += ' golden' sanitized = re.sub(f'(?', sanitized, flags=re.I) if comment: marseys_used.add(emoji) @@ -276,13 +276,13 @@ def filter_emojis_only(title): if emoji.startswith("!"): emoji = emoji[1:] classes = 'emoji mirrored' - if random() < 0.01: classes += ' golden' + if random() < 0.01 and 'marsey' in emoji: classes += ' golden' if path.isfile(f'files/assets/images/emojis/{emoji}.webp'): title = re.sub(f'(?', title, flags=re.I) elif path.isfile(f'files/assets/images/emojis/{emoji}.webp'): classes = 'emoji' - if random() < 0.01: classes += ' golden' + if random() < 0.01 and 'marsey' in emoji: classes += ' golden' title = re.sub(f'(?', title, flags=re.I) if len(title) > 1500: abort(400)