From 51e8122b195cd2b1fc28bd223d2cece4be459e00 Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 23 Mar 2023 11:30:21 +0200 Subject: [PATCH] quick fix to complies_with_chud --- files/helpers/sanitize.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 833ff14fb..2fe22b77f 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -624,8 +624,9 @@ def complies_with_chud(obj): tags = soup.html.body.find_all('p', recursive=False) - for x in tags: - if obj.author.agendaposter_phrase in str(x.find(text=True, recursive=False)): - return True + for tag in tags: + for text in tag.find_all(text=True, recursive=False): + if obj.author.agendaposter_phrase in text: + return True return False