This commit is contained in:
Kovid Goyal 2015-11-20 09:53:17 +05:30
commit 45e732332d

View File

@ -134,6 +134,8 @@ def merge_comments(one, two):
return comments_to_html(one) + '\n\n' + comments_to_html(two) return comments_to_html(one) + '\n\n' + comments_to_html(two)
def sanitize_html(html): def sanitize_html(html):
if not html:
return u''
if isinstance(html, bytes): if isinstance(html, bytes):
html = html.decode('utf-8', 'replace') html = html.decode('utf-8', 'replace')
import html5lib import html5lib