--- a/pidgin/gtkimhtml.c Thu May 14 03:20:38 2020 -0500
+++ b/pidgin/gtkimhtml.c Fri May 15 01:43:54 2020 -0500
@@ -2054,48 +2054,44 @@
gtk_smiley_tree_lookup (GtkSmileyTree *tree,
- gunichar text_ch = g_utf8_get_char(text);
- if((amp = purple_markup_unescape_entity(text, &alen))) {
+ if(*x == '&' && (amp = purple_markup_unescape_entity(x, &alen))) { - const char *amp_next = g_utf8_next_char(amp);
/* Make sure all chars of the unescaped value match */
- while (g_utf8_get_char(amp_next)) {
- pos = g_utf8_strchr (t->values->str, -1, g_utf8_get_char(amp));
+ pos = strchr (t->values->str, *amp); t = t->children [GPOINTER_TO_INT(pos) - GPOINTER_TO_INT(t->values->str)];
- amp_next = g_utf8_next_char(amp_next);
- pos = g_utf8_strchr (t->values->str, -1, g_utf8_get_char(amp));
+ pos = strchr (t->values->str, *amp); - else if (text_ch == '<') /* Because we're all WYSIWYG now, a '<'
+ else if (*x == '<') /* Because we're all WYSIWYG now, a '<' * char should only appear as the start of a tag. Perhaps a safer (but costlier)
* check would be to call gtk_imhtml_is_tag on it */
- alen = g_unichar_to_utf8 (text_ch, NULL);
- pos = g_utf8_strchr (t->values->str, -1, text_ch);
+ pos = strchr (t->values->str, *x); @@ -2105,9 +2101,8 @@
- text = g_utf8_next_char(text);
- text_ch = g_utf8_get_char(text);