Use xmlcharrefreplace for qute:* encoding

This commit is contained in:
Florian Bruhin 2014-05-25 20:26:14 +02:00
parent 03c7a0ce2a
commit 5bf32d80fe

View File

@ -58,7 +58,8 @@ def _get_html(title, snippet):
Return:
HTML content as bytes.
"""
return _HTML_TEMPLATE.format(title=title, body=snippet).encode('UTF-8')
return _HTML_TEMPLATE.format(title=title, body=snippet).encode(
'UTF-8', errors='xmlcharrefreplace')
class QuteSchemeHandler(SchemeHandler):