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 %}
diff --git a/files/templates/login.html b/files/templates/login.html index e543fd7cc..4ff0a3488 100644 --- a/files/templates/login.html +++ b/files/templates/login.html @@ -18,7 +18,7 @@ {% endblock %} - + diff --git a/files/templates/login_2fa.html b/files/templates/login_2fa.html index e6feb0969..105af207c 100644 --- a/files/templates/login_2fa.html +++ b/files/templates/login_2fa.html @@ -14,7 +14,7 @@ 2-Step Login - {{SITE_NAME}} - + diff --git a/files/templates/settings.html b/files/templates/settings.html index 7e5ff8350..66e55c41d 100644 --- a/files/templates/settings.html +++ b/files/templates/settings.html @@ -34,7 +34,7 @@ - + {% if v.agendaposter %} - + {% else %} - + {% endif %} diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index 7e0802d18..e56a1f858 100644 --- a/files/templates/sign_up.html +++ b/files/templates/sign_up.html @@ -31,7 +31,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %} - + diff --git a/files/templates/sign_up_failed_ref.html b/files/templates/sign_up_failed_ref.html index c63008260..8cf7d221f 100644 --- a/files/templates/sign_up_failed_ref.html +++ b/files/templates/sign_up_failed_ref.html @@ -32,7 +32,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %} - + diff --git a/files/templates/submit.html b/files/templates/submit.html index 1ff77c75c..cae2cc26b 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -26,7 +26,7 @@ {% block stylesheets %} {% if v %} - + {% if v.agendaposter %} - + {% endif %} {% endblock %}