remove weird spaes

remotes/1693045480750635534/spooky-22
Aevann1 2022-08-17 22:30:07 +02:00
parent 0715ab3e64
commit 5234c8ef21
5 changed files with 5 additions and 5 deletions

View File

@ -245,7 +245,7 @@ def sanitize(sanitized, edit=False, limit_pings=False, showmore=True):
v = getattr(g, 'v', None)
matches = [m for m in mention_regex.finditer(sanitized) if m]
names = set( m.group(2) for m in matches )
names = set(m.group(2) for m in matches)
if limit_pings and len(names) > 3 and not v.admin_level: abort(406)
users = get_users(names, graceful=True)

View File

@ -62,7 +62,7 @@ def chart(kind, site):
plt.rcParams['figure.figsize'] = (chart_width, 20)
signup_chart = plt.subplot2grid((chart_width, 20), ( 0, 0), rowspan=6, colspan=chart_width)
signup_chart = plt.subplot2grid((chart_width, 20), (0, 0), rowspan=6, colspan=chart_width)
posts_chart = plt.subplot2grid((chart_width, 20), (10, 0), rowspan=6, colspan=chart_width)
comments_chart = plt.subplot2grid((chart_width, 20), (20, 0), rowspan=6, colspan=chart_width)

View File

@ -24,7 +24,7 @@ total = cache.get(f'{SITE}_total') or 0
@app.get("/chat")
@auth_required
def chat( v):
def chat(v):
return render_template("chat.html", v=v, messages=messages)

View File

@ -71,4 +71,4 @@ def feeds_user(sort='hot', t='all'):
with tag("content", type="html"):
doc.cdata(f'''<img alt="{post.realtitle(None)}" loading="lazy" src="{image_url}"><br>{post.realbody(None)}''')
return Response( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+ doc.getvalue(), mimetype="application/xml")
return Response("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+ doc.getvalue(), mimetype="application/xml")

View File

@ -79,7 +79,7 @@ def flag_comment(cid, v):
comment = get_comment(cid)
existing = g.db.query(CommentFlag.comment_id).filter_by( user_id=v.id, comment_id=comment.id).one_or_none()
existing = g.db.query(CommentFlag.comment_id).filter_by(user_id=v.id, comment_id=comment.id).one_or_none()
if existing: return "", 409
reason = request.values.get("reason", "").strip()