diff --git a/files/classes/comment.py b/files/classes/comment.py index 8d81ad83b..08c6d93db 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -388,7 +388,7 @@ class Comment(Base): if v: body += f''' onchange="poll_vote('{c.id}', '{self.id}')"''' else: body += f''' onchange="poll_vote_no_v('{c.id}', '{self.id}')"''' body += f'''>' if self.choices: @@ -401,7 +401,7 @@ class Comment(Base): body += f'''
' if self.author.sig_html and (self.author_id == MOOSE_ID or (not self.ghost and not (v and v.sigs_disabled))): diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 55ba04faf..44e123f02 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -114,7 +114,7 @@ def callback(attrs, new=False): if not href.startswith('/') and not href.startswith(f'{SITE_FULL}/'): attrs[(None, "target")] = "_blank" - attrs[(None, "rel")] = "nofollow noopener noreferrer" + attrs[(None, "rel")] = "nofollow noopener noreferrer" return attrs @@ -397,4 +397,4 @@ def normalize_url(url): url = imgur_regex.sub(r'\1_d.webp?maxwidth=9999&fidelity=high', url) url = giphy_tenor_regex.sub(r'\1.webp', url) - return url \ No newline at end of file + return url diff --git a/files/routes/posts.py b/files/routes/posts.py index 8d94a4655..f3687b865 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1085,7 +1085,7 @@ def submit_post(v, sub=None): name2 = name.replace('.webp', 'r.webp') copyfile(name, name2) - post.thumburl = process_image(v.patron, name2, resize=100) + post.thumburl = process_image(v.patron, name2, resize=100) elif file.content_type.startswith('video/'): value = process_video(file) if type(value) is str: post.url = value @@ -1212,7 +1212,7 @@ def submit_post(v, sub=None): newposturl = post.url if newposturl.startswith('/'): newposturl = f"{SITE_FULL}{newposturl}" - body += f"Snapshots:\n\n{rev}* [archive.org](https://web.archive.org/{newposturl})\n* [archive.ph](https://archive.ph/?url={quote(newposturl)}&run=1) (click to archive)\n* [ghostarchive.org](https://ghostarchive.org/search?term={quote(newposturl)}) (click to archive)\n\n" + body += f"Snapshots:\n\n{rev}* [archive.org](https://web.archive.org/{newposturl})\n* [archive.ph](https://archive.ph/?url={quote(newposturl)}&run=1) (click to archive)\n* [ghostarchive.org](https://ghostarchive.org/search?term={quote(newposturl)}) (click to archive)\n\n" gevent.spawn(archiveorg, newposturl) captured = [] @@ -1224,7 +1224,7 @@ def submit_post(v, sub=None): if not href: continue title = i.group(2) - if "Snapshots:\n\n" not in body: body += "Snapshots:\n\n" + if "Snapshots:\n\n" not in body: body += "Snapshots:\n\n" if f'**[{title}]({href})**:\n\n' not in body: body += f'**[{title}]({href})**:\n\n' diff --git a/files/templates/comments.html b/files/templates/comments.html index 078b4e47e..74f9bfe64 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -230,7 +230,7 @@ {% if c.treasure_amount.startswith('l') %}