Mercurial > genshi > genshi-test
comparison genshi/filters/tests/html.py @ 839:85a61d0bd67b stable-0.5.x
Ported [1046:1047] to 0.5.x branch.
author | cmlenz |
---|---|
date | Tue, 17 Mar 2009 17:20:04 +0000 |
parents | 09a90feb9269 |
children | b09f746b4881 |
comparison
equal
deleted
inserted
replaced
812:b87be223c83c | 839:85a61d0bd67b |
---|---|
315 | 315 |
316 def test_sanitize_unchanged(self): | 316 def test_sanitize_unchanged(self): |
317 html = HTML('<a href="#">fo<br />o</a>') | 317 html = HTML('<a href="#">fo<br />o</a>') |
318 self.assertEquals(u'<a href="#">fo<br/>o</a>', | 318 self.assertEquals(u'<a href="#">fo<br/>o</a>', |
319 unicode(html | HTMLSanitizer())) | 319 unicode(html | HTMLSanitizer())) |
320 html = HTML('<a href="#with:colon">foo</a>') | |
321 self.assertEquals(u'<a href="#with:colon">foo</a>', | |
322 unicode(html | HTMLSanitizer())) | |
320 | 323 |
321 def test_sanitize_escape_text(self): | 324 def test_sanitize_escape_text(self): |
322 html = HTML('<a href="#">fo&</a>') | 325 html = HTML('<a href="#">fo&</a>') |
323 self.assertEquals(u'<a href="#">fo&</a>', | 326 self.assertEquals(u'<a href="#">fo&</a>', |
324 unicode(html | HTMLSanitizer())) | 327 unicode(html | HTMLSanitizer())) |