Beispiel #1
0
 def mock_content():
   return html.clean("pirate ninja robot “spam” should be “eggs”")
Beispiel #2
0
 def test_clean(self):
   """Strip all tags and decode html entities to unicode code points."""
   encoded = '<p>From the Latin <i>emendare</i>, &#x201c;to free from fault.&rdquo;</p>'
   decoded = u'From the Latin emendare, \u201cto free from fault.\u201d'
   self.assertEquals(clean(encoded), decoded)
Beispiel #3
0
 def mock_content():
   return html.clean("pirate ninja robot &ldquo;ninja&rdquo; should be &ldquo;zombie&rdquo;")