Initial deploy setup
deploy / deploy (push) Canceled after 0s

This commit is contained in:
Jens
2026-07-21 14:00:00 +02:00
commit b8091e59bd
285 changed files with 27854 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import pytest
from apps.jobs.services.sanitize import sanitize_job_html
@pytest.mark.security
def test_sanitize_removes_script_handlers_forms_and_iframes():
dirty = (
'<p onclick="alert(1)">Hallo</p><script>alert(1)</script>'
'<iframe src="x"></iframe><form><input></form>'
'<a href="javascript:alert(1)">x</a>'
)
clean = sanitize_job_html(dirty)
assert "script" not in clean.lower()
assert "onclick" not in clean.lower()
assert "iframe" not in clean.lower()
assert "form" not in clean.lower()
assert "javascript:" not in clean.lower()