From 550d0ab91237a6471e6d5d25a97d716defe13f22 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 2 Aug 2021 16:47:56 +0200 Subject: [PATCH] fdfd --- drama/helpers/sanitize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drama/helpers/sanitize.py b/drama/helpers/sanitize.py index 755f51690..70e5ce973 100644 --- a/drama/helpers/sanitize.py +++ b/drama/helpers/sanitize.py @@ -6,7 +6,7 @@ from functools import partial from .get import * from os import path -domain = environ.get("domain").strip() +site = environ.get("domain").strip() _allowed_tags = tags = ['b', 'blockquote', @@ -184,7 +184,7 @@ def sanitize(text, linkgen=False, flair=False): else: emojisize = 30 for i in re.finditer(':(.{1,30}?):', sanitized): if path.isfile(f'./drama/assets/images/emojis/{i.group(1)}.gif'): - sanitized = sanitized.replace(f':{i.group(1)}:', f'') + sanitized = sanitized.replace(f':{i.group(1)}:', f'') sanitized = sanitized.replace("https://www.", "https://").replace("https://youtu.be/", "https://youtube.com/embed/").replace("https://music.youtube.com/watch?v=", "https://youtube.com/embed/").replace("/watch?v=", "/embed/").replace("https://open.spotify.com/", "https://open.spotify.com/embed/").replace("https://streamable.com/", "https://streamable.com/e/").replace("https://youtube.com/shorts/", "https://youtube.com/embed/")