From f1340d6dab14758faca1b45fc256fc7b361ae758 Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 27 Apr 2023 16:12:56 +0200 Subject: [PATCH] fix using emojis in polls while chudded --- files/helpers/sanitize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 732ed83c3..b7e1858ee 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -644,7 +644,7 @@ def complies_with_chud(obj): old_body_html = obj.body_html #torture body_html - if obj.body_html: + if obj.body_html and '

&&' not in obj.body_html and '

$$' not in obj.body_html and '

##' not in obj.body_html: soup = BeautifulSoup(obj.body_html, 'lxml') tags = soup.html.body.find_all(lambda tag: tag.name not in {'blockquote','codeblock','pre'} and tag.string, recursive=False) for tag in tags: