fix using emojis in polls while chudded

master
Aevann 2023-04-27 16:12:56 +02:00
parent ef56dd3f71
commit f1340d6dab
1 changed files with 1 additions and 1 deletions

View File

@ -644,7 +644,7 @@ def complies_with_chud(obj):
old_body_html = obj.body_html old_body_html = obj.body_html
#torture body_html #torture body_html
if obj.body_html: if obj.body_html and '<p>&amp;&amp;' not in obj.body_html and '<p>$$' not in obj.body_html and '<p>##' not in obj.body_html:
soup = BeautifulSoup(obj.body_html, 'lxml') 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) tags = soup.html.body.find_all(lambda tag: tag.name not in {'blockquote','codeblock','pre'} and tag.string, recursive=False)
for tag in tags: for tag in tags: