From 5bf32d80fe3444dcef2b42869261fd76f41ead24 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 25 May 2014 20:26:14 +0200 Subject: [PATCH] Use xmlcharrefreplace for qute:* encoding --- qutebrowser/network/qutescheme.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qutebrowser/network/qutescheme.py b/qutebrowser/network/qutescheme.py index 4e41e6b91..c81a986bd 100644 --- a/qutebrowser/network/qutescheme.py +++ b/qutebrowser/network/qutescheme.py @@ -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):