From bde983bdeb8297b2347c4bc13bb734e01de48f48 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 12 Apr 2019 08:38:50 +0530 Subject: [PATCH] When transforming comments HTML dont use closing br tags as older versions of WebKit cannot handle them --- src/calibre/library/comments.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/library/comments.py b/src/calibre/library/comments.py index 510bd344ab..445dae90c9 100644 --- a/src/calibre/library/comments.py +++ b/src/calibre/library/comments.py @@ -2,7 +2,7 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai # License: GPLv3 Copyright: 2010, Kovid Goyal -from __future__ import print_function, unicode_literals +from __future__ import absolute_import, division, print_function, unicode_literals import re @@ -128,7 +128,7 @@ def comments_to_html(comments): for p in container.findAll('p'): p['class'] = 'description' - return container.decode_contents() + return container.decode_contents().replace('

', '
') def markdown(val):