From 95e824f308698cbd50b1e96446ea10bb95b8af6c Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 26 Feb 2023 12:22:00 +0200 Subject: [PATCH] fix this https://stupidpol.site/post/150139/2-million-subscriber-youtuber-gets-rape/3665865#context --- files/helpers/sanitize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 285713569..0b2c30bd8 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -323,7 +323,7 @@ def sanitize_settings_text(sanitized:Optional[str], max_length:Optional[int]=Non chud_images = listdir("files/assets/images/chud") -chud_images = [f'\n![](/i/chud/{f})' for f in chud_images] +chud_images = [f'\n\n![](/i/chud/{f})' for f in chud_images] chud_images.extend([':#trumpjaktalking:', ':#reposthorse:']) def handle_youtube_links(url): @@ -381,7 +381,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=True, count_marseys sanitized = linefeeds_regex.sub(r'\1\n\n\2', sanitized) sanitized = greentext_regex.sub(r'\1\>\2', sanitized) - sanitized = image_regex.sub(r'\1![](\2)', sanitized) + sanitized = image_regex.sub(r'\1\n\n![](\2)\n\n', sanitized) sanitized = image_check_regex.sub(r'\1', sanitized) sanitized = link_fix_regex.sub(r'\1https://\2', sanitized)