fix 500 error

pull/142/head
Aevann 2023-03-25 20:32:31 +02:00
parent 6e713ca930
commit a3f555c23a
1 changed files with 1 additions and 0 deletions

View File

@ -639,6 +639,7 @@ def complies_with_chud(obj):
#torture body_html
tags = soup.html.body.find_all(lambda tag: tag.name not in {'blockquote','codeblock','pre'}, recursive=False)
for tag in tags:
if not tag.string: continue
tag.string.replace_with(torture_ap(tag.text, obj.author.username))
obj.body_html = str(soup)