javaxmppsmackpidgin

Send a link in an <a>m or something that has the same effect, in an XMPP message using Smack


I'm using the pidgin xmpp client and I want to send from java a hyperlink, I have all the code necessary to send messages, but when it comes to sending a hyperlink the only format that I can successfully send from java seems to be the raw url:

http://abc.xyz

This works fine but what I want is something more like:

Alphabet

I've tried using <a> but that just comes out in the raw format again:

<a href="http://abc.xyz">Alphabet</a>

Edit: I have written a client so I can read the raw format and it seems there are characters in the message that get escaped, notably < goes to &lt; and > goes to &gt;


Solution

  • To send HTML formatted IM messages over XMPP you need to use XHTML-IM to send your message.

    Do that and pidgin should display it correctly.