From 80f6ac599f79546512b522566cb421acea1aca19 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Thu, 28 Jul 2011 10:02:38 -0400 Subject: All internal encoding of output now uses the 'xmlcharrefreplace' error handler. Also added a note to the docs. Anyone doing their own encoding of output should be as well. --- tests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/__init__.py b/tests/__init__.py index 8fbc5d9..b274b1e 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -51,7 +51,7 @@ def get_args(file, config): def normalize(text): """ Normalize whitespace for a string of html using tidy. """ - return str(tidy.parseString(text.encode('utf-8'), + return str(tidy.parseString(text.encode('utf-8', errors='xmlcharrefreplace'), drop_empty_paras=0, fix_backslash=0, fix_bad_comments=0, -- cgit v1.2.3