diff --git a/src/snek/system/template.py b/src/snek/system/template.py index 896e5d9..3dd4357 100644 --- a/src/snek/system/template.py +++ b/src/snek/system/template.py @@ -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