MAde elements forbidden.

This commit is contained in:
retoor 2025-06-06 03:28:05 +02:00
parent 1c71c0016b
commit ef75cb3341

View File

@ -131,8 +131,9 @@ def whitelist_attributes(html):
for tag in soup.find_all():
if hasattr(tag, 'attrs'):
if tag.name == 'script':
if tag.name in ['script','form','input']:
tag.replace_with('')
continue
attrs = dict(tag.attrs)
for attr in list(attrs):
# Check if attribute is in the safe list or is a data-* attribute