diff -r c7c4775a5619 -r 7b88d12b4ee2 test/unittest_entity.py --- a/test/unittest_entity.py Thu Sep 17 15:52:46 2009 +0200 +++ b/test/unittest_entity.py Tue Sep 22 12:11:12 2009 +0200 @@ -348,6 +348,18 @@ e['content'] = u'C'est un exemple sérieux' self.assertEquals(tidy(e.printable_value('content')), u"C'est un exemple sérieux") + e['content'] = u'
ms orifice produces weird html
' + self.assertEquals(tidy(e.printable_value('content')), + u'
ms orifice produces weird html
') + import tidy as tidymod # apt-get install python-tidy + tidy = lambda x: str(tidymod.parseString(x.encode('utf-8'), + **{'drop_proprietary_attributes': True, + 'output_xhtml': True, + 'show_body_only' : True, + 'quote-nbsp' : False, + 'char_encoding' : 'utf8'})).decode('utf-8').strip() + self.assertEquals(tidy(e.printable_value('content')), + u'
ms orifice produces weird html
') # make sure valid xhtml is left untouched e['content'] = u'
R&D
' self.assertEquals(e.printable_value('content'), e['content'])