diff --git a/files/classes/user.py b/files/classes/user.py
index 84e4f9dcd..4edf46f2e 100644
--- a/files/classes/user.py
+++ b/files/classes/user.py
@@ -214,7 +214,7 @@ class User(Base):
@property
@lazy
def paid_dues(self):
- return self.admin_level > 1 or self.club_allowed or self.truecoins > int(environ.get("DUES").strip()) and self.club_allowed != False
+ return self.admin_level > 1 or self.patron > 1 or self.club_allowed in {True,None} or self.truecoins > int(environ.get("DUES").strip())
def any_block_exists(self, other):
diff --git a/files/helpers/alerts.py b/files/helpers/alerts.py
index ad82c84b4..840560f52 100644
--- a/files/helpers/alerts.py
+++ b/files/helpers/alerts.py
@@ -67,7 +67,7 @@ def NOTIFY_USERS(text, v):
if id == 0: continue
if word in text.lower() and id not in notify_users and v.id != id: notify_users.add(id)
- soup = BeautifulSoup(text, features="html.parser")
+ soup = BeautifulSoup(text, 'xml')
for mention in soup.find_all("a", href=re.compile("^\/id\/([0-9]+)")):
id = int(mention["href"].split("/id/")[1])
if id != v.id:
diff --git a/files/helpers/filters.py b/files/helpers/filters.py
index bcfb2b086..dbde82898 100644
--- a/files/helpers/filters.py
+++ b/files/helpers/filters.py
@@ -5,7 +5,7 @@ from files.classes import BannedDomain
def filter_comment_html(html_text):
- soup = BeautifulSoup(html_text, features="html.parser")
+ soup = BeautifulSoup(html_text, 'xml')
links = soup.find_all("a")
diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py
index 60f9adc13..d662c0fb4 100644
--- a/files/helpers/sanitize.py
+++ b/files/helpers/sanitize.py
@@ -126,7 +126,7 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False):
for i in re.finditer("
@((\w|-){1,25})", sanitized, re.A):
u = get_user(i.group(1), graceful=True)
if u:
- sanitized = sanitized.replace(i.group(0), f'''
@{u.username}''', 1)
+ sanitized = sanitized.replace(i.group(0), f'''
@{u.username}''', 1)
else:
sanitized = re.sub('(^|\s|\n|
)\/?((r|u)\/(\w|-){3,25})', r'\1/\2', sanitized, re.A)
@@ -139,7 +139,7 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False):
if noimages:
sanitized = sanitized.replace(i.group(0), f'{i.group(1)}@{u.username}', 1)
else:
- sanitized = sanitized.replace(i.group(0), f'''{i.group(1)}@{u.username}''', 1)
+ sanitized = sanitized.replace(i.group(0), f'''{i.group(1)}@{u.username}''', 1)
for i in re.finditer('https://i\.imgur\.com/(([^_]*?)\.(jpg|png|jpeg))(?!)', sanitized):
@@ -168,7 +168,7 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False):
]
).clean(sanitized)
- soup = BeautifulSoup(sanitized, features="html.parser")
+ soup = BeautifulSoup(sanitized, 'xml')
for tag in soup.find_all("img"):
if tag.get("src") and tag.get("class") != ['pp20']:
diff --git a/files/routes/posts.py b/files/routes/posts.py
index 5ac5e876b..f663a40eb 100644
--- a/files/routes/posts.py
+++ b/files/routes/posts.py
@@ -670,7 +670,7 @@ def thumbnail_thread(pid):
if x.headers.get("Content-Type","").startswith("text/html"):
- soup=BeautifulSoup(x.content, 'html.parser')
+ soup=BeautifulSoup(x.content, 'xml')
thumb_candidate_urls=[]
diff --git a/files/routes/settings.py b/files/routes/settings.py
index 93af1791f..ea1ea7025 100644
--- a/files/routes/settings.py
+++ b/files/routes/settings.py
@@ -483,7 +483,6 @@ def gumroad(v):
v.procoins += procoins
send_repeatable_notification(v.id, f"You have received {procoins} Marseybux! You can use them to buy awards in the [shop](/shop).")
- if v.truecoins > 150 and v.patron: v.cluballowed = True
if v.patron > 1 and v.verified == None: v.verified = "Verified"
g.db.add(v)
diff --git a/files/templates/admins.html b/files/templates/admins.html
index 7b14da729..26bc6f481 100644
--- a/files/templates/admins.html
+++ b/files/templates/admins.html
@@ -22,7 +22,7 @@
{% for user in admins %}
{{loop.index}} |
- {{user.username}}{% if user.admin_level == 1 and v and v.admin_level > 1 %}{% endif %} |
+ {{user.username}}{% if user.admin_level == 1 and v and v.admin_level > 1 %}{% endif %} |
{{user.truecoins}} |
{{user.modaction_num}} |
diff --git a/files/templates/agendaposters.html b/files/templates/agendaposters.html
index 53d43e271..5c30b759b 100644
--- a/files/templates/agendaposters.html
+++ b/files/templates/agendaposters.html
@@ -11,7 +11,7 @@
{% for user in users %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{% endfor %}
diff --git a/files/templates/banned.html b/files/templates/banned.html
index b6362adc8..8a1fd8b4b 100644
--- a/files/templates/banned.html
+++ b/files/templates/banned.html
@@ -13,9 +13,9 @@
{% for user in users %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{% if user.ban_reason %}{{user.ban_reason}}{% endif %} |
- {{user.banned_by.username}} |
+ {{user.banned_by.username}} |
{% endfor %}
diff --git a/files/templates/comments.html b/files/templates/comments.html
index 9190c8b3d..82e1c17e3 100644
--- a/files/templates/comments.html
+++ b/files/templates/comments.html
@@ -223,7 +223,7 @@
{% if not c.author %}
{{c.print()}}
{% endif %}
- {{c.author_name}}
+ {{c.author_name}}
{% if c.author.customtitle %} {% if c.author.quadrant %}{% endif %}{{c.author.customtitle | safe}}{% endif %}
{% endif %}
diff --git a/files/templates/followers.html b/files/templates/followers.html
index b876e794c..b8babe243 100644
--- a/files/templates/followers.html
+++ b/files/templates/followers.html
@@ -21,7 +21,7 @@
{% for user in users %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{% if v.id == u.id %}
Remove follow |
{% endif %}
diff --git a/files/templates/following.html b/files/templates/following.html
index 3c44eb0ae..1cddc85ef 100644
--- a/files/templates/following.html
+++ b/files/templates/following.html
@@ -21,7 +21,7 @@
{% for user in users %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{% if v.id == u.id %}
Unfollow |
{% endif %}
diff --git a/files/templates/grassed.html b/files/templates/grassed.html
index d104ff55c..ce953d374 100644
--- a/files/templates/grassed.html
+++ b/files/templates/grassed.html
@@ -13,7 +13,7 @@
{% for user in users %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{{user.ban_reason.split('by ')[1]}} |
{% endfor %}
diff --git a/files/templates/leaderboard.html b/files/templates/leaderboard.html
index 7d03c6cc3..c3c9a2b1c 100644
--- a/files/templates/leaderboard.html
+++ b/files/templates/leaderboard.html
@@ -17,14 +17,14 @@
{% for user in users1 %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{{user.coins}} |
{% endfor %}
{% if pos1 > 25 %}
{{pos1}} |
- {{v.username}} |
+ {{v.username}} |
{{v.coins}} |
{% endif %}
@@ -52,14 +52,14 @@
{% for user in users7 %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{{user.coins_spent}} |
{% endfor %}
{% if pos7 > 25 %}
{{pos7}} |
- {{v.username}} |
+ {{v.username}} |
{{v.coins_spent}} |
{% endif %}
@@ -87,14 +87,14 @@
{% for user in users10 %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{{user.truecoins}} |
{% endfor %}
{% if pos10 > 25 %}
{{pos10}} |
- {{v.username}} |
+ {{v.username}} |
{{v.truecoins}} |
{% endif %}
@@ -121,14 +121,14 @@
{% for user in users2 %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{{user.stored_subscriber_count}} |
{% endfor %}
{% if pos2 > 25 %}
{{pos2}} |
- {{v.username}} |
+ {{v.username}} |
{{v.stored_subscriber_count}} |
{% endif %}
@@ -153,14 +153,14 @@
{% for user in users3 %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{{user.post_count}} |
{% endfor %}
{% if pos3 > 25 %}
{{pos3}} |
- {{v.username}} |
+ {{v.username}} |
{{v.post_count}} |
{% endif %}
@@ -185,14 +185,14 @@
{% for user in users4 %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{{user.comment_count}} |
{% endfor %}
{% if pos4 > 25 %}
{{pos4}} |
- {{v.username}} |
+ {{v.username}} |
{{v.comment_count}} |
{% endif %}
@@ -219,14 +219,14 @@
{% for user in users5 %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{{user.received_award_count}} |
{% endfor %}
{% if pos5 > 25 %}
{{pos5}} |
- {{v.username}} |
+ {{v.username}} |
{{v.received_award_count}} |
{% endif %}
@@ -255,14 +255,14 @@
{% for user in users9 %}
{{loop.index}} |
- {{user[0].username}} |
+ {{user[0].username}} |
{{user[1]}} |
{% endfor %}
{% if pos9 and (pos9[0] > 25 or not pos9[1]) %}
{{pos9[0]}} |
- {{v.username}} |
+ {{v.username}} |
{{pos9[1]}} |
{% endif %}
@@ -292,14 +292,14 @@
{% for user in users11 %}
{{loop.index}} |
- {{user[0].username}} |
+ {{user[0].username}} |
{{user[1]}} |
{% endfor %}
{% if pos11 and (pos11[0] > 25 or not pos11[1]) %}
{{pos11[0]}} |
- {{v.username}} |
+ {{v.username}} |
{{pos11[1]}} |
{% endif %}
@@ -329,14 +329,14 @@
{% for user in users6 %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{{user.basedcount}} |
{% endfor %}
{% if pos6 > 25 %}
{{pos6}} |
- {{v.username}} |
+ {{v.username}} |
{{v.basedcount}} |
{% endif %}
@@ -366,14 +366,14 @@
{% for user in users12 %}
{{loop.index}} |
- {{user[0].username}} |
+ {{user[0].username}} |
{{user[1]}} |
{% endfor %}
{% if pos12 and (pos12[0] > 25 or not pos12[1]) %}
{{pos12[0]}} |
- {{v.username}} |
+ {{v.username}} |
{{pos12[1]}} |
{% endif %}
@@ -404,14 +404,14 @@
{% for user in users13 %}
{{loop.index}} |
- {{user[0].username}} |
+ {{user[0].username}} |
{{user[1]}} |
{% endfor %}
{% if pos13 and (pos13[0] > 25 or not pos13[1]) %}
{{pos13[0]}} |
- {{v.username}} |
+ {{v.username}} |
{{pos13[1]}} |
{% endif %}
@@ -432,14 +432,14 @@
{% for user in users14 %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{{user.winnings}} |
{% endfor %}
{% if pos14 > 25 %}
{{pos14}} |
- {{v.username}} |
+ {{v.username}} |
{{v.winnings}} |
{% endif %}
@@ -463,14 +463,14 @@
{% for user in users15 %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{{user.winnings}} |
{% endfor %}
{% if pos15 > 25 %}
{{pos15}} |
- {{v.username}} |
+ {{v.username}} |
{{v.winnings}} |
{% endif %}
diff --git a/files/templates/marseys.html b/files/templates/marseys.html
index 79f9e974e..a8f8fd909 100644
--- a/files/templates/marseys.html
+++ b/files/templates/marseys.html
@@ -22,7 +22,7 @@
{{marsey.name}} |
|
{{marsey.count}} |
- {{author.username}} |
+ {{author.username}} |
{% endfor %}
{% else %}
diff --git a/files/templates/patrons.html b/files/templates/patrons.html
index 08b1142a0..5a4ecb131 100644
--- a/files/templates/patrons.html
+++ b/files/templates/patrons.html
@@ -12,7 +12,7 @@
{% for u in users %}
{{loop.index}} |
- {{u.username}} |
+ {{u.username}} |
|
diff --git a/files/templates/rentoids.html b/files/templates/rentoids.html
index 84b499c70..72dd805de 100644
--- a/files/templates/rentoids.html
+++ b/files/templates/rentoids.html
@@ -13,7 +13,7 @@
{% for user in users %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{% endfor %}
diff --git a/files/templates/settings_blocks.html b/files/templates/settings_blocks.html
index ed20e7518..705648c2e 100644
--- a/files/templates/settings_blocks.html
+++ b/files/templates/settings_blocks.html
@@ -59,7 +59,7 @@
- @{{block.target.username}}
+ @{{block.target.username}}
|
{{block.created_date}} |
diff --git a/files/templates/shadowbanned.html b/files/templates/shadowbanned.html
index 79803af07..72e86f95b 100644
--- a/files/templates/shadowbanned.html
+++ b/files/templates/shadowbanned.html
@@ -14,7 +14,7 @@
{% for user in users %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{{user.shadowbanned}} |
{% endfor %}
diff --git a/files/templates/sub/blockers.html b/files/templates/sub/blockers.html
index 4e825b00d..8a3b0a95a 100644
--- a/files/templates/sub/blockers.html
+++ b/files/templates/sub/blockers.html
@@ -16,7 +16,7 @@
{% for user in users %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{% endfor %}
diff --git a/files/templates/sub/exilees.html b/files/templates/sub/exilees.html
index ac717ed45..bf5531350 100644
--- a/files/templates/sub/exilees.html
+++ b/files/templates/sub/exilees.html
@@ -18,8 +18,8 @@
{% set exiler=exile.exiler %}
{{loop.index}} |
- {{user.username}} |
- {{exiler.username}} |
+ {{user.username}} |
+ {{exiler.username}} |
{% endfor %}
diff --git a/files/templates/sub/mods.html b/files/templates/sub/mods.html
index 0f5d8c52d..57bf127a6 100644
--- a/files/templates/sub/mods.html
+++ b/files/templates/sub/mods.html
@@ -18,7 +18,7 @@
{% for user, mod in users %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{{mod.created_datetime}} |
{% if v.id == user.id or v.mod_date(sub.name) and v.mod_date(sub.name) < mod.created_utc %}
diff --git a/files/templates/submission.html b/files/templates/submission.html
index 6d05256ef..8e9accb0a 100644
--- a/files/templates/submission.html
+++ b/files/templates/submission.html
@@ -735,7 +735,7 @@
{% if p.author.verified %}
{% endif %}
- {{p.author_name}}{% if p.author.customtitle %} {% if p.author.quadrant %}{% endif %}{{p.author.customtitle | safe}}{% endif %}
+ {{p.author_name}}{% if p.author.customtitle %} {% if p.author.quadrant %}{% endif %}{{p.author.customtitle | safe}}{% endif %}
{% endif %}
{{p.age_string}}
({% if p.is_image %}image post{% elif p.is_video %}video post{% elif p.realurl(v) %}{{p.domain}}{% else %}text post{% endif %})
diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html
index 14a1d8c79..658378c11 100644
--- a/files/templates/submission_listing.html
+++ b/files/templates/submission_listing.html
@@ -200,7 +200,7 @@
{% if p.author.verified %}
{% endif %}
- {{p.author_name}}{% if p.author.customtitle %} {% if p.author.quadrant %}{% endif %}{{p.author.customtitle | safe}}{% endif %}
+ {{p.author_name}}{% if p.author.customtitle %} {% if p.author.quadrant %}{% endif %}{{p.author.customtitle | safe}}{% endif %}
{% endif %}
{{p.age_string}}
diff --git a/files/templates/thiefs.html b/files/templates/thiefs.html
index 9b4b0d301..b05694f97 100644
--- a/files/templates/thiefs.html
+++ b/files/templates/thiefs.html
@@ -13,7 +13,7 @@
{% for user in successful %}
|
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{% endfor %}
@@ -31,7 +31,7 @@
{% for user in failed2 %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{% endfor %}
@@ -49,7 +49,7 @@
{% for user in failed %}
{{loop.index}} |
- {{user.username}} |
+ {{user.username}} |
{% endfor %}
diff --git a/files/templates/user_listing.html b/files/templates/user_listing.html
index 30b0f28e0..040a8ca0a 100644
--- a/files/templates/user_listing.html
+++ b/files/templates/user_listing.html
@@ -5,7 +5,7 @@
diff --git a/files/templates/userpage.html b/files/templates/userpage.html
index 0b68ed7ae..772cac8c8 100644
--- a/files/templates/userpage.html
+++ b/files/templates/userpage.html
@@ -39,7 +39,7 @@
-
+
{% if u.is_suspended %}
@@ -363,7 +363,7 @@
-
+
{% if u.is_suspended %}
diff --git a/files/templates/viewers.html b/files/templates/viewers.html
index 168aaa4e6..64da52856 100644
--- a/files/templates/viewers.html
+++ b/files/templates/viewers.html
@@ -12,7 +12,7 @@
{% for view in viewers %}
- {{view.viewer.username}} |
+ {{view.viewer.username}} |
{{view.last_view_string}} |
{% endfor %}
diff --git a/files/templates/voters.html b/files/templates/voters.html
index bca565605..f5f1b35bc 100644
--- a/files/templates/voters.html
+++ b/files/templates/voters.html
@@ -18,14 +18,14 @@
{% for user in users %}
{{loop.index}} |
- {{user[0].username}} |
+ {{user[0].username}} |
{{user[1]}} |
{% endfor %}
{% if pos and (pos[0] > 25 or not pos[1]) %}
{{pos[0]}} |
- {{v.username}} |
+ {{v.username}} |
{{pos[1]}} |
{% endif %}
diff --git a/files/templates/votes.html b/files/templates/votes.html
index 549cf9ad5..f2729b69a 100644
--- a/files/templates/votes.html
+++ b/files/templates/votes.html
@@ -23,7 +23,7 @@
User |
---|
{% for vote in ups %}
-
{{vote.user.username}} |
+
{{vote.user.username}} |
{% endfor %}
@@ -32,7 +32,7 @@
User |
---|
{% for vote in downs %}
-
{{vote.user.username}} |
+
{{vote.user.username}} |
{% endfor %}