--- a/src/gtkimhtml.c Sun Apr 24 13:27:48 2005 -0400
+++ b/src/gtkimhtml.c Sun Apr 24 17:25:58 2005 -0400
@@ -1494,23 +1494,39 @@
if(*x == '&' && gtk_imhtml_is_amp_escape(x, &, &alen)) {
- len += alen - strlen(amp);
- x += alen - strlen(amp);
- pos = strchr (t->values->str, *amp);
+ gboolean matched = TRUE; + /* Make sure all chars of the unescaped value match */ + pos = strchr (t->values->str, *amp); + t = t->children [GPOINTER_TO_INT(pos) - GPOINTER_TO_INT(t->values->str)]; + pos = strchr (t->values->str, *amp); 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 */
- pos = strchr (t->values->str, *x);
+ pos = strchr (t->values->str, *x); t = t->children [GPOINTER_TO_INT(pos) - GPOINTER_TO_INT(t->values->str)];