Does Google Talk accept HTML formatted chats?

I have sent Google Talk chats that are HTML in the way described by this question: How do you send HTML formatted messages over XMPP with Node.JS?

However, Gtalk seems to just interpret it as text. Does Gtalk accept HTML formatted messages?

To respond to the comment below: it could be either the client or the server that Google runs which is interpreting it incorrectly.

Answers


Yes, Google Talk accepts HTML formatted messages. However, as you observed, it disregards the formatted text and only shows the plain text. According to the XHTML-IM XEP, every HTML message must be accompanied by a plain text message for compatibility with clients that do not support HTML formatted messages.

When I send this example message to the Google Talk client on my Windows machine (using Psi's XML input console)...

<message to="test@gmail.com/Talk.v10445D0E8B1">
  <body>Wow, I&apos;m green with envy!</body>
  <html xmlns='http://jabber.org/protocol/xhtml-im'>
    <body xmlns='http://www.w3.org/1999/xhtml'>
      <p style='font-size:large'>
        <em>Wow</em>, I&apos;m <span style='color:green'>green</span>
        with <strong>envy</strong>!
      </p>
    </body>
  </html>
</message>

... I just see the text Wow, I'm green with envy!.

When I send the same message to my Psi client logged in to Google Talk, I receive...

<message from="test@jabber.org/Ben-PC" to="test@gmail.com">
<body>Wow, I'm green with envy!</body>
<html xmlns="http://jabber.org/protocol/xhtml-im">
<body xmlns="http://www.w3.org/1999/xhtml">
          <p style="font-size:large">
            <em>Wow</em>, I'm <span style="color:green">green</span>
            with <strong>envy</strong>!
          </p>
        </body>
      </html>
</message>

It was not stripped from the HTML, exactly as I expected (servers should not change the contents of messages). It shows as , so it looks like Psi does support formatted text.

The way to test for capabilities is using Service Discovery. If I send...

<iq to='test@gmail.com/Talk.v10445D0E8B1' type='get'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>

... I receive...

<iq from="test@gmail.com/Talk.v10445D0E8B1" type="error" to="test@jabber.org/Ben-PC">
<query xmlns="http://jabber.org/protocol/disco#info"/>
<error type="cancel" code="501">
<feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>

... which means the Google Talk client does not support Service Discovery. We have to rely on the observation that HTML message text is ignored by the Google Talk client and server.


Need Your Help

Regex for splitting txt db file

regex split comma separator

I'm writing a txt database file to sql converter, and I need to split the items in the rows. The problem is that among the items there might be scripts which can hold multiple commas (which are the

Draggable jQuery on Phonegap android

jquery android cordova

I'm having some problems while implementing jQuery Draggable http://jqueryui.com/demos/draggable/ on Android. I've created the html code and tested it using my browser. Then I compiled it on

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.