def test_strip():
 s = '<scri<script>pt>alert(1)</scr</script>ipt>'
 eq_('pt&gt;alert(1)ipt&gt;', clean(s, strip=True))
 s = '<scri<scri<script>pt>pt>alert(1)</script>'
 eq_('pt&gt;pt&gt;alert(1)', clean(s, strip=True))

def test_strip ( ) : s = '<scri<script>pt>alert(1)</scr</script>ipt>' eq_ ( 'pt&gt;alert(1)ipt&gt;' , clean ( s , strip = True ) ) s = '<scri<scri<script>pt>pt>alert(1)</script>' eq_ ( 'pt&gt;pt&gt;alert(1)' , clean ( s , strip = True ) )
using strip=true shouldnt result in malicious content .