コード例 #1
0
ファイル: tests.py プロジェクト: cltrudeau/django-yacon
 def test_sanitize(self):
     """ Test sanitize function in templatetags """
     self.assertEqual(sanitize('test<script></script>'),
                      'test&lt;script&gt;&lt;/script&gt;')
コード例 #2
0
ファイル: tests.py プロジェクト: gchandrasa/django_sanitizer
 def test_sanitize(self):
     """ Test sanitize function in templatetags """
     self.assertEqual(sanitize('test<script></script>'), 'test')
     self.assertEqual(sanitize('<a href="">test</a>'), '<a href="">test</a>')
コード例 #3
0
 def test_sanitize(self):
     """ Test sanitize function in templatetags """
     self.assertEqual(sanitize('test<script></script>'), 'test&lt;script&gt;&lt;/script&gt;')