mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
sanitize_html shouldn't error when handed an empty string.
This commit is contained in:
parent
069e77b9b9
commit
052351795a
@ -134,6 +134,8 @@ def merge_comments(one, two):
|
||||
return comments_to_html(one) + '\n\n' + comments_to_html(two)
|
||||
|
||||
def sanitize_html(html):
|
||||
if not html:
|
||||
return u''
|
||||
if isinstance(html, bytes):
|
||||
html = html.decode('utf-8', 'replace')
|
||||
import html5lib
|
||||
|
Loading…
x
Reference in New Issue
Block a user