aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--markdown/__init__.py2
-rw-r--r--tests/__init__.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/markdown/__init__.py b/markdown/__init__.py
index 630198e..57ed587 100644
--- a/markdown/__init__.py
+++ b/markdown/__init__.py
@@ -348,7 +348,7 @@ class Markdown:
output_file.write(html)
output_file.close()
else:
- output.write(html.encode(encoding, errors="xmlcharrefreplace"))
+ output.write(html.encode(encoding, "xmlcharrefreplace"))
return self
diff --git a/tests/__init__.py b/tests/__init__.py
index b274b1e..3cc90b7 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', errors='xmlcharrefreplace'),
+ return str(tidy.parseString(text.encode('utf-8', 'xmlcharrefreplace'),
drop_empty_paras=0,
fix_backslash=0,
fix_bad_comments=0,