allow chud phrase in header tags

pull/142/head
Aevann 2023-03-25 00:45:31 +02:00
parent 0b61725135
commit d871e6c9f8
1 changed files with 3 additions and 2 deletions

View File

@ -611,7 +611,8 @@ def validate_css(css):
return True, ""
phrase_tags = {'p','h1','h2','h3','h4','h5','h6'}
def complies_with_chud(obj):
if not obj.author.agendaposter: return True
if obj.author.marseyawarded: return True
@ -636,7 +637,7 @@ def complies_with_chud(obj):
print(f'{STARS}{old_body_html}{STARS}', flush=True)
return False
tags = soup.html.body.find_all(lambda tag: tag.name == 'p' and not tag.attrs, recursive=False)
tags = soup.html.body.find_all(lambda tag: tag.name in phrase_tags and not tag.attrs, recursive=False)
for tag in tags:
for text in tag.find_all(text=True, recursive=False):