diff --git a/src/calibre/library/comments.py b/src/calibre/library/comments.py index ed0e34233f..ffb6282d9b 100644 --- a/src/calibre/library/comments.py +++ b/src/calibre/library/comments.py @@ -128,7 +128,7 @@ def comments_to_html(comments): for p in container.findAll('p'): p['class'] = 'description' - return container.decode_contents().replace('

', '
') + return container.decode_contents() def markdown(val): @@ -169,6 +169,9 @@ def find_tests(): '

a b

cd

'), ]: cval = comments_to_html(pat) + # normalize
representations produced by different + # versions of html5-parser + cval = cval.replace('

', '
').replace('
', '
') self.assertEqual(cval, val) return unittest.defaultTestLoader.loadTestsFromTestCase(Test)