From 476142bb23b725d6edd411eb0d88c96af4221d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20Ram=C3=ADrez?= Date: Sun, 15 Jun 2014 20:28:11 -0600 Subject: [PATCH] Fix UnicodeEncodeError ascii decode error in markdown filter. --- secretary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secretary.py b/secretary.py index 209714d..cfb3b6f 100644 --- a/secretary.py +++ b/secretary.py @@ -350,7 +350,7 @@ class Render(object): styles_cache = {} # cache styles searching html_text = markdown(markdown_text) - xml_object = parseString('%s' % html_text) + xml_object = parseString('%s' % html_text.encode('ascii', 'xmlcharrefreplace')) # Transform HTML tags as specified in transform_map # Some tags may require extra attributes in ODT.