Initial commit: site monorepo with API, web, and infra.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from app.modules.content.service import sanitize_html
|
||||
|
||||
|
||||
def test_sanitize_html_strips_javascript_protocol():
|
||||
raw = '<a href="javascript:alert(1)">x</a><img src="javascript:alert(1)" alt="x" />'
|
||||
clean = sanitize_html(raw)
|
||||
assert "javascript:" not in clean
|
||||
Reference in New Issue
Block a user