XMPP HTML 消息发送到 Pidgin,但无法发送到 Jitsi
任何人都知道为什么以这种方式格式化的消息可以通过 XMPP 正确发送到运行 Pidgin 的用户,但根本无法发送到运行 Jitsi 的用户?失败时没有伴随任何错误消息。
<message to="fancy.pants@thesrv0001">
<html xmlns="http://jabber.org/protocol/xhtml-im">
<body xmlns="http://www.w3.org/1999/xhtml">
<a href="http://www.google.com/">link test</a>
</body>
</html>
</message>
我也对构建 HTML 消息的其他方法感兴趣,也许其中一种适用于 Jitsi。谢谢大家!
Anyone know why a Message formatted in this way would send properly via XMPP to users running Pidgin but fail to send at all to users running Jitsi? There is no error message to accompany the failure.
<message to="fancy.pants@thesrv0001">
<html xmlns="http://jabber.org/protocol/xhtml-im">
<body xmlns="http://www.w3.org/1999/xhtml">
<a href="http://www.google.com/">link test</a>
</body>
</html>
</message>
I'm also interested in alternative ways of constructing an HTML Message, maybe one of them will work for Jitsi. Thanks, all!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
并非所有客户端都实现 XEP-0071 (XHTML-IM),因此建议两者都尝试确定对方是否使用 XHTML(请参阅 部分10),并且还强制使用普通的
body
元素:Jitsi 很可能没有实现 XEP-0071,但它应该能够获取纯文本版本。
注意:当您收到 XHTML IM 时,请确保您已阅读安全注意事项。如果您不小心过滤掉所有未明确允许的元素、属性和样式,发件人就可以很容易地攻击您。
Not all clients implement XEP-0071 (XHTML-IM), so it recommends both trying to figure out if the other side speaks XHTML (see section 10), and also mandates the use of a normal
body
element:It's likely that Jitsi doesn't implement XEP-0071, but it should be able to pick up the plain text version.
NOTE: When you're receiving an XHTML IM, make SURE you've read the security considerations. If you're not careful to filter out all of the elements, attributes, and styles that are not explicitly allowed, a sender can attack you quite easily.