We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d15673 commit 8173404Copy full SHA for 8173404
test_naucse/test_validation.py
@@ -16,6 +16,19 @@ def test_allowed_elements():
16
)
17
18
19
+def test_allow_attributes():
20
+ allowed_elements = naucse.validation.AllowedElementsParser()
21
+
22
+ allowed_elements.reset_and_feed(
23
+ "<div class='test'><span style='color: red'><a href='/courses/'>Text</a></span></div>"
24
+ )
25
26
+ with pytest.raises(naucse.validation.DisallowedElement):
27
28
+ """<div class='test' onhover="alert('XSS')"><a href='/courses/'>Text</a></div>"""
29
30
31
32
def test_allowed_styles():
33
allowed_elements = naucse.validation.AllowedElementsParser()
34
0 commit comments