This commit is contained in:
Aevann1 2022-01-28 04:54:50 +02:00
parent 997e8743ee
commit d2e8c1b817
6 changed files with 25 additions and 23 deletions

View file

@ -238,6 +238,10 @@ def api_comment(v):
if v.agendaposter and not v.marseyawarded: body = torture_ap(body, v.username)
if '#fortune' in body:
body = body.replace('#fortune', '')
body += '\n\n<p>' + random.choice(FORTUNE_REPLIES) + '</p>'
body_html = sanitize(body, comment=True)
if v.marseyawarded and len(list(re.finditer('>[^<\s+]|[^>\s+]<', body_html, flags=re.A))): return {"error":"You can only type marseys!"}, 403
@ -431,11 +435,6 @@ def api_comment(v):
g.db.add(n)
if request.host == "rdrama.net" and random.random() < 0.001:
body = "zoz"