From ef75cb33414f427dd1d134a62303fdfe70492a13 Mon Sep 17 00:00:00 2001 From: retoor Date: Fri, 6 Jun 2025 03:28:05 +0200 Subject: [PATCH] MAde elements forbidden. --- src/snek/system/template.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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