diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-05-04 22:52:24 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-05-04 22:52:24 +0200 |
commit | c784deea9c6a3a2d19a6bfe56d2eae92e9c901f5 (patch) | |
tree | bbc380be81733c75e23a9f1627cf68c970b40379 /src/xhtml.py | |
parent | eaf9af6b2d697e497884fa22fe135e0dcf43854c (diff) | |
parent | 0029f4708276699ec656280b5731278e16c2add2 (diff) | |
download | poezio-c784deea9c6a3a2d19a6bfe56d2eae92e9c901f5.tar.gz poezio-c784deea9c6a3a2d19a6bfe56d2eae92e9c901f5.tar.bz2 poezio-c784deea9c6a3a2d19a6bfe56d2eae92e9c901f5.tar.xz poezio-c784deea9c6a3a2d19a6bfe56d2eae92e9c901f5.zip |
Fix the paused status that was sent on /part and other inapropriate situations
Diffstat (limited to 'src/xhtml.py')
-rw-r--r-- | src/xhtml.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xhtml.py b/src/xhtml.py index fee5a118..954db374 100644 --- a/src/xhtml.py +++ b/src/xhtml.py @@ -27,6 +27,7 @@ import re import subprocess from sleekxmpp.xmlstream import ET from xml.etree.ElementTree import ElementTree +from sys import version_info from config import config import logging @@ -82,8 +83,11 @@ def convert_links_to_plaintext(text): parent.text += link_text parent.remove(child) previous_child = child + if version_info.minor <= 1: + return ET.tostring(xml.getroot()) return ET.tostring(xml.getroot(), encoding=str) + def clean_text(string): """ Remove all \x19 from the string |