# HG changeset patch # User Goffi # Date 1392899290 -3600 # Node ID 4cc55e05266d9f6047188352662e718e3b0dfbd2 # Parent a8260ee887087209d6a88a87936d8706905ac2b7 plugin text syntaxes: fixed cleaners encoding diff -r a8260ee88708 -r 4cc55e05266d src/plugins/plugin_misc_text_syntaxes.py --- 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")