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:
parent
e2a62bbbe7
commit
bf29554121
1 changed files with 2 additions and 0 deletions
|
@ -437,6 +437,8 @@ class ChatTab(Tab):
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
body = xhtml.clean_text(xhtml.xhtml_to_poezio_colors(arg))
|
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)
|
ET.fromstring(arg)
|
||||||
except:
|
except:
|
||||||
self.core.information('Could not send custom xhtml', 'Error')
|
self.core.information('Could not send custom xhtml', 'Error')
|
||||||
|
|
Loading…
Reference in a new issue