diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index fd0d7ff6f..9e0efa811 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -208,22 +208,22 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False): sanitized = sanitized.replace(old, new) - emojis = list(re.finditer('(? 20: edit = True for i in emojis: - emoji = i.group(1).lower() + emoji = i.group(1).lower().replace('#','') if emoji.startswith("!"): emoji = emoji[1:] classes = 'emoji mirrored' if not edit and random() < 0.005 and 'marsey' in emoji: classes += ' golden' if path.isfile(f'files/assets/images/emojis/{emoji}.webp'): - sanitized = re.sub(f'(?', sanitized, flags=re.I) + 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 not edit and random() < 0.005 and 'marsey' in emoji: classes += ' golden' - sanitized = re.sub(f'(?', sanitized, flags=re.I) + sanitized = re.sub(f'(?', sanitized, flags=re.I) if comment: marseys_used.add(emoji) sanitized = sanitized.replace("https://youtu.be/", "https://youtube.com/watch?v=").replace("https://music.youtube.com/watch?v=", "https://youtube.com/watch?v=").replace("https://open.spotify.com/", "https://open.spotify.com/embed/").replace("https://streamable.com/", "https://streamable.com/e/").replace("https://youtube.com/shorts/", "https://youtube.com/watch?v=").replace("https://mobile.twitter", "https://twitter").replace("https://m.facebook", "https://facebook").replace("m.wikipedia.org", "wikipedia.org").replace("https://m.youtube", "https://youtube").replace("https://www.youtube", "https://youtube") diff --git a/files/routes/posts.py b/files/routes/posts.py index dff26f7ba..3c4a40656 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1200,7 +1200,7 @@ def submit_post(v): n = Notification(comment_id=c.id, user_id=v.id) g.db.add(n) - if body == '!slots1000': + if body.startswith('!slots1000'): slots = Slots(g) slots.check_for_slots_command(body, snappy, c) diff --git a/files/templates/authforms.html b/files/templates/authforms.html index 574c1bf7f..7fb3d4318 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -15,7 +15,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/default.html b/files/templates/default.html index cb3297397..f7011d51e 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -7,7 +7,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/log.html b/files/templates/log.html index 357a172a1..12d74dd70 100644 --- a/files/templates/log.html +++ b/files/templates/log.html @@ -6,7 +6,7 @@ {% block content %} {% if v %} - + {% if v.agendaposter %} - + {% endif %}