sfd
This commit is contained in:
parent
332867b5bc
commit
e73042b34b
2 changed files with 1 additions and 2 deletions
|
@ -199,7 +199,7 @@ class Comment(Base):
|
||||||
def replies(self):
|
def replies(self):
|
||||||
r = self.__dict__.get("replies", None)
|
r = self.__dict__.get("replies", None)
|
||||||
if r: r = [x for x in r if not x.author.shadowbanned]
|
if r: r = [x for x in r if not x.author.shadowbanned]
|
||||||
if not r and r != []: r = sorted((x for x in self.child_comments if not x.author.shadowbanned and x.author_id not in (AUTOPOLLER_ID, AUTOBETTER_ID)), key=lambda x: x.realupvotes, reverse=True)
|
if not r and r != []: r = sorted((x for x in self.child_comments if x.author and not x.author.shadowbanned and x.author_id not in (AUTOPOLLER_ID, AUTOBETTER_ID)), key=lambda x: x.realupvotes, reverse=True)
|
||||||
return r
|
return r
|
||||||
|
|
||||||
@replies.setter
|
@replies.setter
|
||||||
|
|
|
@ -151,7 +151,6 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False):
|
||||||
soup = BeautifulSoup(sanitized, features="html.parser")
|
soup = BeautifulSoup(sanitized, features="html.parser")
|
||||||
|
|
||||||
for tag in soup.find_all("img"):
|
for tag in soup.find_all("img"):
|
||||||
|
|
||||||
if tag.get("src") and tag.get("class") != ['pp20']:
|
if tag.get("src") and tag.get("class") != ['pp20']:
|
||||||
tag["class"] = "in-comment-image"
|
tag["class"] = "in-comment-image"
|
||||||
tag["loading"] = "lazy"
|
tag["loading"] = "lazy"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue