:marseyjanny:

remotes/1693045480750635534/spooky-22
atrc445 2021-09-05 11:49:48 +02:00
parent 0583239c21
commit b099cbe26d
4 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,7 @@
from sqlalchemy import *
from sqlalchemy.orm import relationship
from files.__main__ import Base
from files.helpers.sanitize import sanitize
from .mix_ins import *
import time
@ -68,9 +69,9 @@ class ModAction(Base, Stndrd, Age_times):
@property
def target_link(self):
if self.target_user:
return f'<a href="{self.target_user.url}">{self.target_user.username}</a>'
return f'<a href="{self.target_user.url}">{sanitize(self.target_user.username)}</a>'
elif self.target_post:
return f'<a href="{self.target_post.permalink}">{self.target_post.title}</a>'
return f'<a href="{self.target_post.permalink}">{sanitize(self.target_post.title)}</a>'
elif self.target_comment:
return f'<a href="{self.target_comment.permalink}">comment</a>'

View File

@ -694,7 +694,7 @@ def ban_user(user_id, v):
# check for number of days for suspension
days = int(request.form.get("days")) if request.form.get('days') else 0
reason = request.values.get("reason", "")
reason = sanitize(request.values.get("reason", ""))
message = request.values.get("reason", "")
if not user: abort(400)

View File

@ -12,7 +12,7 @@
</thead>
{% for user in users %}
<tr>
<td style="font-weight: bold">{{users.index(user)+1}}</td>
<td style="font-weight: bold">{{loop.index}}</td>
<td><a style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img loading="lazy" src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}};"{% endif %}>{{user.username}}</span></a></td>
</tr>
{% endfor %}

View File

@ -156,7 +156,6 @@
<div class="font-weight-bolder">
<span id="profile-coins-amount">{{u.coins}}</span> {{"COINS_NAME" | app_config}}&nbsp;&nbsp; {% if u.stored_subscriber_count >=1 and not u.is_nofollow %}<a href="/@{{u.username}}/followers">{{u.stored_subscriber_count}} follower{{'s' if u.stored_subscriber_count != 1 else ''}}</a>&nbsp;&nbsp; {% endif %}joined <span data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{{u.created_datetime}}">{{u.created_date}}</span>
</div>
{% if "pcm" in request.host %}<p class="text-muted">Based Count: {{u.basedcount}}</p>{% endif %}
{% if u.bio_html %}