summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2012-09-01 08:29:33 +0200
committerFlorent Le Coz <louiz@louiz.org>2012-09-01 08:47:41 +0200
commitbf295541213e78c47987f4d774c102e7f1de1008 (patch)
tree7047337b22b4b088dac25c3fed26f45fbd526652
parente2a62bbbe7bc89d64abfaafae91f0c79053692bf (diff)
downloadpoezio-bf295541213e78c47987f4d774c102e7f1de1008.tar.gz
poezio-bf295541213e78c47987f4d774c102e7f1de1008.tar.bz2
poezio-bf295541213e78c47987f4d774c102e7f1de1008.tar.xz
poezio-bf295541213e78c47987f4d774c102e7f1de1008.zip
Add a <body xmlns='http://www.w3.org/1999/xhtml'/> element on /xhtml command
Because not having that element is not allowed by the xhtml-im XEP, poezio should put that by default.
-rw-r--r--src/tabs.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 9291654f..e3d2de36 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -437,6 +437,8 @@ class ChatTab(Tab):
return
try:
body = xhtml.clean_text(xhtml.xhtml_to_poezio_colors(arg))
+ # The <body /> element is the only allowable child of the <xhtm-im>
+ arg = "<body xmlns='http://www.w3.org/1999/xhtml'>%s</body>" % (arg,)
ET.fromstring(arg)
except:
self.core.information('Could not send custom xhtml', 'Error')