GtkIMHtml hack still needed?

Andrew Victor at
Thu Jan 28 15:06:34 EST 2010


In pidgin/gtkconv.c:
    /* Awful hack to work around GtkIMHtml's inefficient rendering of
messages with lots of formatting changes.
     * If a message has over 100 '<' characters, strip formatting
before appending it. Hopefully nobody actually
     * needs that much formatting, anyway.
    for (bracket = strchr(displaying, '<'); bracket && *(bracket + 1);
bracket = strchr(bracket + 1, '<'))

    if (tag_count > 100) {
        char *tmp = displaying;
        displaying = purple_markup_strip_html(tmp);

ie, If there are more than 100 HTML tags in a message, then all the
markup is stripped and the raw message is dumped to the conversation

Is this "hack" still needed with the current GtkIMHtml?

For MXit's Services we're trying to show a more visually appealing
user-interface using HTML formatting in the conversation window.
At the moment we have a work-around for the "hack" above
[libpurple/protocols/mxit/markup.c mxit_show_split_message()] to count
HTML tags and then try to intelligently split the message into
multiple messages for the Gtk conversation window.
A messy solution, but was necessary when it was a 3rd-party plugin.

The "hack" was originally added in the Gaim days (2007-01-18):

Is it possible to remove this "hack" from pidgin/gtkconv.c?

  Andrew Victor

More information about the Devel mailing list