According to https://xmpp.org/extensions/xep-0071.html#concepts (and the chapters following it), XHTML-IM content is supposed to be wrapped in a <html/> tag, which must contain one or more <body/> tags.
The root element for including XHTML content within XMPP stanzas is <html/>. This element is qualified by the 'http://jabber.org/protocol/xhtml-im' namespace. From the perspective of XMPP, the wrapper element functions as an XMPP extension element; from the perspective of XHTML, it functions as a wrapper for XHTML 1.0 content qualified by the 'http://www.w3.org/1999/xhtml' namespace. Such XHTML content MUST be contained in one or more <body/> elements qualified by the 'http://www.w3.org/1999/xhtml' namespace and MUST conform to the XHTML-IM Integration Set defined in the following section.
Bifrost (or rather, the xmppjs part of it) wraps XHTML-IM content in the correct <html/> tag, but does not add the required <body/> tag.
As an example, suppose you want to embed <a href="https://foo.bar">Click me</a>. This is currently emitted as
According to https://xmpp.org/extensions/xep-0071.html#concepts (and the chapters following it), XHTML-IM content is supposed to be wrapped in a
<html/>
tag, which must contain one or more<body/>
tags.Bifrost (or rather, the xmppjs part of it) wraps XHTML-IM content in the correct
<html/>
tag, but does not add the required<body/>
tag. As an example, suppose you want to embed<a href="https://foo.bar">Click me</a>
. This is currently emitted asbut should instead be emitted as
Please note that this incorrect behavior is also reflected in the test cases in
test/xmppjs/test_XHTMLIM.ts
.The current behavior causes clients receiving these XHTML-IM messages to fail to parse them; this includes all clients based on nbxmpp, such as Gajim.