diff --git a/files/helpers/markdown.py b/files/helpers/markdown.py index 55caa7432e..ef072ae92a 100644 --- a/files/helpers/markdown.py +++ b/files/helpers/markdown.py @@ -81,7 +81,7 @@ class CustomRenderer(HTMLRenderer): if not user: return f"{space}@{target}" - return f'''{space}@{username}'s profile picture@{user.username}''' + return f'''{space}@{user.username}'s profile picture@{user.username}''' def render_sub_mention(self, token): space = token.target[0] diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index cead164997..bf286cec4b 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -205,7 +205,7 @@ def sanitize(sanitized, noimages=False): for i in re.finditer('" target="_blank">(https://youtube\.com/watch\?v\=(.*?))', sanitized): url = i.group(1) yt_id = i.group(2).split('&')[0].split('%')[0] - replacing = f'{url}' + replacing = f'{url}' params = parse_qs(urlparse(url.replace('&','&')).query) t = params.get('t', params.get('start', [0]))[0] diff --git a/files/routes/posts.py b/files/routes/posts.py index 0a2c613370..b3ff39d044 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -697,7 +697,7 @@ def thumbnail_thread(pid): for chunk in image_req.iter_content(1024): file.write(chunk) - post.thumburl = "https://" + site + process_image(name, True) + post.thumburl = f"https://{site}/" + process_image(name, True) db.add(post) db.commit() db.close() diff --git a/files/routes/static.py b/files/routes/static.py index 1dad043fb2..fd35707b4d 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -262,11 +262,10 @@ def static_service(path): return resp @app.get('/images/') -@app.get('/IMAGES/') @app.get('/hostedimages/') @limiter.exempt def images(path): - resp = make_response(send_from_directory('images', path.replace('.WEBP','.webp'))) + resp = make_response(send_from_directory('../images', path.replace('.WEBP','.webp'))) resp.headers.remove("Cache-Control") resp.headers.add("Cache-Control", "public, max-age=2628000") if request.path.endswith('.webp'): diff --git a/files/templates/admin/apps.html b/files/templates/admin/apps.html index 07e3e4d875..bf9cd895f8 100644 --- a/files/templates/admin/apps.html +++ b/files/templates/admin/apps.html @@ -14,7 +14,7 @@
diff --git a/files/templates/contact.html b/files/templates/contact.html index deb999b8d0..81884571f6 100644 --- a/files/templates/contact.html +++ b/files/templates/contact.html @@ -50,11 +50,11 @@ {% elif v %} -

Please verify your email address in order to ensure we can respond to your message if needed. Then, refresh this page.

+

Please verify your email address in order to ensure we can respond to your message if needed. Then, refresh this page.

{% else %} -

In order to ensure that we can respond to your message, please first sign up or log in and make sure you have verified your email address. Then, refresh this page.

+

In order to ensure that we can respond to your message, please first sign up or log in and make sure you have verified your email address. Then, refresh this page.

{% endif %}