# HG changeset patch # User Mark Doliner # Date 1201152260 0 # Node ID 3634d27ec6f12076ee41e0fa374ca3941371722c # Parent bcaf4a03770472e83b8206d528e291650505d163 Change purple_markup_html_to_xhtml() to convert tags to , as the latter is what is used in XEP-0071 http://www.xmpp.org/extensions/xep-0071.html#examples We use this function in two other places outside of Jabber: libpurple/log.c and pidgin/plugins/gtkbuddynote.c. I don't think this change will negatively affect either of them, because the generated xhtml will only be viewed by Pidgin, and Pidgin understands the span tag. Thanks to Thomas Bohn for emailing meebo about this. diff -r bcaf4a037704 -r 3634d27ec6f1 libpurple/util.c --- a/libpurple/util.c Wed Jan 23 21:46:54 2008 +0000 +++ b/libpurple/util.c Thu Jan 24 05:24:20 2008 +0000 @@ -1445,7 +1445,6 @@ ALLOW_TAG("pre"); ALLOW_TAG("q"); ALLOW_TAG("span"); - ALLOW_TAG("strong"); ALLOW_TAG("ul"); @@ -1465,9 +1464,14 @@ plain = g_string_append_c(plain, '\n'); continue; } - if(!g_ascii_strncasecmp(c, "", 3) || !g_ascii_strncasecmp(c, "", strlen(""))) { + if(!g_ascii_strncasecmp(c, "", 3) || !g_ascii_strncasecmp(c, "", strlen("")) || !g_ascii_strncasecmp(c, "", strlen(""))) { struct purple_parse_tag *pt = g_new0(struct purple_parse_tag, 1); - pt->src_tag = *(c+2) == '>' ? "b" : "bold"; + if (*(c+2) == '>') + pt->src_tag = "b"; + else if (*(c+2) == 'o') + pt->src_tag = "bold"; + else + pt->src_tag = "strong"; pt->dest_tag = "span"; tags = g_list_prepend(tags, pt); c = strchr(c, '>') + 1;