# HG changeset patch # User Paul Aurich # Date 1291097174 0 # Node ID 1203778744d03b289cd4be60a2c16a25d71c23f1 # Parent 18d56b13fe8b062a83a1ee8c5c9d3fb4fef98775 gtkimhtml: Display "<3" instead of "<3" after too many smileys in convo I encountered this in a long-lived, active MUC. Interestingly, this may have persisted even after I disabled smileys and restarted (I'm unsure whether I restarted or not). I also don't know why this works, other than it does. diff -r 18d56b13fe8b -r 1203778744d0 ChangeLog --- a/ChangeLog Mon Nov 29 07:13:08 2010 +0000 +++ b/ChangeLog Tue Nov 30 06:06:14 2010 +0000 @@ -5,6 +5,12 @@ * Fix the exceptions in purple-remote on Python 2.6+. (Ari Pollak) (#12151) + Pidgin: + * When a conversation has reached the maximum limit on the number + of smileys, display the text representation of the smiley properly + when it contains HTML-escapable characters (e.g. "<3" was previously + displayed as "<3"). + libpurple: * Fix multipart parsing when '=' is included in the boundary for purple_mime_document_parse. (Jakub Adam) (#11598) diff -r 18d56b13fe8b -r 1203778744d0 pidgin/gtkimhtml.c --- a/pidgin/gtkimhtml.c Mon Nov 29 07:13:08 2010 +0000 +++ b/pidgin/gtkimhtml.c Tue Nov 30 06:06:14 2010 +0000 @@ -4905,18 +4905,20 @@ * are apparently pretty inefficient. Hopefully we can remove this * restriction when we're using a better HTML widget. */ + unescaped = purple_unescape_html(smiley); numsmileys_thismsg = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(imhtml), "gtkimhtml_numsmileys_thismsg")); if (numsmileys_thismsg >= 30) { - gtk_text_buffer_insert(imhtml->text_buffer, iter, smiley, -1); + gtk_text_buffer_insert(imhtml->text_buffer, iter, unescaped, -1); + g_free(unescaped); return; } numsmileys_total = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(imhtml), "gtkimhtml_numsmileys_total")); if (numsmileys_total >= 300) { - gtk_text_buffer_insert(imhtml->text_buffer, iter, smiley, -1); + gtk_text_buffer_insert(imhtml->text_buffer, iter, unescaped, -1); + g_free(unescaped); return; } - unescaped = purple_unescape_html(smiley); imhtml_smiley = gtk_imhtml_smiley_get(imhtml, sml, unescaped); if (imhtml->format_functions & GTK_IMHTML_SMILEY) { @@ -4991,7 +4993,7 @@ g_object_set_data(G_OBJECT(imhtml), "gtkimhtml_numsmileys_thismsg", GINT_TO_POINTER(numsmileys_thismsg + 1)); g_object_set_data(G_OBJECT(imhtml), "gtkimhtml_numsmileys_total", GINT_TO_POINTER(numsmileys_total + 1)); } else { - gtk_text_buffer_insert(imhtml->text_buffer, iter, smiley, -1); + gtk_text_buffer_insert(imhtml->text_buffer, iter, unescaped, -1); } if (ebox) {