MAde elements forbidden.
This commit is contained in:
parent
1c71c0016b
commit
ef75cb3341
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user