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.
This commit is contained in:
Florent Le Coz 2012-09-01 08:29:33 +02:00
parent e2a62bbbe7
commit bf29554121

View file

@ -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')