changeset 852:4cc55e05266d

plugin text syntaxes: fixed cleaners encoding
author Goffi <goffi@goffi.org>
date Thu, 20 Feb 2014 13:28:10 +0100
parents a8260ee88708
children c2f6ada7858f
files src/plugins/plugin_misc_text_syntaxes.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/plugin_misc_text_syntaxes.py	Thu Feb 20 13:28:09 2014 +0100
+++ b/src/plugins/plugin_misc_text_syntaxes.py	Thu Feb 20 13:28:10 2014 +0100
@@ -182,7 +182,7 @@
             xhtml_elt = cleaner.clean_html(xhtml_elt)
             for elt in xhtml_elt.xpath("//*[@style]"):
                 elt.set("style", clean_style(elt.get('style')))
-            return html.tostring(xhtml_elt, method='xml')
+            return html.tostring(xhtml_elt, encoding=unicode, method='xml')
 
         return deferToThread(blocking_cleaning, xhtml)
 
@@ -256,4 +256,4 @@
         """
         cleaner = clean.Cleaner(kill_tags=['style'])
         cleaned = cleaner.clean_html(html.fromstring(xhtml))
-        return html.tostring(cleaned, method="text")
+        return html.tostring(cleaned, encoding=unicode, method="text")