From 29fb9c53118e57c65f4ae5b6b4bb5d1871ee5a35 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Mon, 3 Oct 2016 22:38:36 +0100 Subject: [PATCH] Specify input and output encodings for tidylib explicitly. tidylib 5 -- which Debian now packages -- has changed the default, and this caused the test suite to break in a recent rebuild (bug #839294). --- NEWS | 5 +++++ rawdoglib/rawdog.py | 2 ++ 2 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index b398346..3491993 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,11 @@ those cases rawdog shouldn't update the URL in the config file. Fix some more style problems reported by pylint. +Specify the input and output character encodings for pytidylib +explicitly. tidylib 5 has changed the defaults from ASCII to UTF-8; +rawdog relies on it being ASCII in order to generate ASCII output +(reported by Lucas Nussbaum). + - rawdog 2.21 Don't crash when asked to show a non-existant template ("-s foo") -- and diff --git a/rawdoglib/rawdog.py b/rawdoglib/rawdog.py index d1d4e4c..8a6702a 100644 --- a/rawdoglib/rawdog.py +++ b/rawdoglib/rawdog.py @@ -136,6 +136,8 @@ def sanitise_html(html, baseurl, inline, config): if config["tidyhtml"]: args = { "numeric_entities": 1, + "input_encoding": "ascii", + "output_encoding": "ascii", "output_html": 1, "output_xhtml": 0, "output_xml": 0, -- 2.35.1