HTML in MySpace prpl

Jeff Connelly shellreef at
Mon Sep 17 01:07:21 EDT 2007

On 9/16/07, Evan Schoenberg <evan.s at> wrote:
> I'm adding support for your MySpace prpl in Adium,
Awesome! I'm definitely going to have to try this out.

> Here's a message which demonstrates what I'm seeing:
Unfortunately, nested bold/underline/italic formatting is not yet
supported by msimprpl. I filed
to track this issue. The problem is basically that HTML uses
hierarchical tags, while MySpaceIM's markup uses bitfields, so code
will have to be written to translate between the two.

> Debug log showing it take <HTML>Simple</HTML> and make it into
> [HTML]Simple[/HTML]
I enclose unknown HTML tags in brackets when converting to MySpaceIM
markup (in html_tag_to_msim_markup() in msimprpl's markup.c), so that
what isn't recognized is immediately apparent. I think this is good
because it encourages bug reports and feedback on unrecognized HTML
sent by the client (and it seems to have worked :).

Fix by changing html_tag_to_msim_markup() to recognize the <html> tag,
and set *begin and *end to g_strdup("") -- therefore replacing the
tags with nothing. I committed this, and a compile-time option to turn
off translating unknown HTML tags to [], in revision
34d642b12b7215d55fd032cd513a7e225715f19a. Patch also available at

Generally, any time you see [tag] .. [/tag] that's an indication of
unsupported HTML in msimprpl sent by the IM client, and msimprpl will
have to be enhanced to support that tag. Ideally, every tag sent by
the IM client will be recognized by msimprpl, so [] will never be

> Debug log showing it handling <HTML><B>Bold</B></HTML>
> 16:19:48: (Libpurple: msim) msim_convert_xmlnode: got root=root
> 16:19:48: (Libpurple: msim) msim_convert_xmlnode: got root=HTML
> 16:19:48: (Libpurple: msim) msim_convert_xmlnode: got root=B
> 16:19:48: (Libpurple: msim)  ** node data=Bold
> 16:19:48: (Libpurple: msim) msim_markup_xmlnode_to_gtkhtml: RETURNING <f
> s='1'>Bold</f>
> 16:19:48: (Libpurple: msim)  ** node name=B
> 16:19:48: (Libpurple: msim) msim_markup_xmlnode_to_gtkhtml: RETURNING
> [HTML]<f s='1'>Bold</f>[/HTML]
> 16:19:48: (Libpurple: msim)  ** node name=HTML
> 16:19:48: (Libpurple: msim) msim_markup_xmlnode_to_gtkhtml: RETURNING
> [HTML]<f s='1'>Bold</f>[/HTML]
> 16:19:48: (Libpurple: msim) msim_markup_to_html: returning [HTML]<f
> s='1'>Bold</f>[/HTML]
> 16:19:48: (Libpurple: msim) sending 1 message from evan.s at to
> tekjew: [HTML]<f s='1'>Bold</f>[/HTML]
This looks like the MySpaceIM markup is not correctly being translated
to HTML for some reason. Could you send me off-list your Adium with
msimprpl included; I could try to do some debugging and figure out
what is going on.

Hope this helps,

More information about the Devel mailing list