From 111630dc0b81bf4b727a53f62ad483d2c56fb65e Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 5 Aug 2021 16:58:25 +0200 Subject: [PATCH] fdfd --- files/helpers/sanitize.py | 2 +- files/routes/flagging.py | 5 ++--- files/templates/header.html | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 72afa6b01..eb53d4b37 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -178,7 +178,7 @@ def sanitize(text, linkgen=False, flair=False): start = '<s>' end = '</s>' - if start in sanitized and end in sanitized and start in sanitized.split(end)[0] and end in sanitized.split(start)[1]: sanitized = sanitized.replace(start, '').replace(end, '') + if start in sanitized and end in sanitized and start in sanitized.split(end)[0] and end in sanitized.split(start)[1]: sanitized = sanitized.replace(start, '').replace(end, '') if flair: emojisize = 20 else: emojisize = 30 diff --git a/files/routes/flagging.py b/files/routes/flagging.py index 59dacd76a..3c613427d 100644 --- a/files/routes/flagging.py +++ b/files/routes/flagging.py @@ -11,11 +11,10 @@ def api_flag_post(pid, v): post = get_post(pid) if v: - existing = g.db.query(Flag).filter_by( - user_id=v.id, post_id=post.id).first() + existing = g.db.query(Flag).filter_by(user_id=v.id, post_id=post.id).first() if existing: return "", 409 - reason = sanitize(request.form.get("reason", "")[:100].strip(), flair=True) + reason = sanitize(request.form.get("reason", "").strip()[:100], flair=True) flag = Flag(post_id=post.id, user_id=v.id, diff --git a/files/templates/header.html b/files/templates/header.html index d9a95cbe0..47c5dc4e1 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -79,7 +79,7 @@
{{v.username}}
-
{{v.coins}} {{"SITE_NAME" | app_config}}coins
+
{{v.coins}} {{"SITE_NAME" | app_config}}coins