From 65cab20a7a31a549e813cab12f85a9d3b58a1ce6 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 3 Aug 2021 21:00:12 +0200 Subject: [PATCH] fdfd --- drama/routes/admin.py | 3 +-- drama/routes/search.py | 1 - drama/routes/settings.py | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drama/routes/admin.py b/drama/routes/admin.py index 8db5a2e24..cf616d986 100644 --- a/drama/routes/admin.py +++ b/drama/routes/admin.py @@ -606,7 +606,6 @@ def admin_title_change(user_id, v): new_name=request.form.get("title").strip() user.customtitleplain=new_name - new_name=new_name.replace('_','\_') new_name = sanitize(new_name, linkgen=True) user=g.db.query(User).with_for_update().options(lazyload('*')).filter_by(id=user.id).first() @@ -937,7 +936,7 @@ def admin_toggle_ban_domain(v): reason=request.form.get("reason", "").strip() - d = g.db.query(BannedDomain).filter_by(domain=domain.replace("_","\_")).first() + d = g.db.query(BannedDomain).filter_by(domain=domain).first() if d: g.db.delete(d) else: d = BannedDomain(domain=domain, reason=reason) diff --git a/drama/routes/search.py b/drama/routes/search.py index b16648bdd..31cd8dc76 100644 --- a/drama/routes/search.py +++ b/drama/routes/search.py @@ -275,7 +275,6 @@ def searchusers(v): term=term.replace('\\','') term=term.replace('_','\_') - now=int(time.time()) users=g.db.query(User).filter(User.username.ilike(f'%{term}%')) users=users.order_by(User.username.ilike(term).desc(), User.stored_subscriber_count.desc()) diff --git a/drama/routes/settings.py b/drama/routes/settings.py index 40fb696c4..78a20e73c 100644 --- a/drama/routes/settings.py +++ b/drama/routes/settings.py @@ -684,7 +684,6 @@ def settings_title_change(v): error="You didn't change anything") v.customtitleplain = new_name - new_name = new_name.replace('_','\_') new_name = sanitize(new_name, flair=True) v = g.db.query(User).with_for_update().options(lazyload('*')).filter_by(id=v.id).first()