changeset 841:3b09dd379600

[gaim-migrate @ 851] hopefully this fixes some bad things committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 05 Sep 2000 03:17:37 +0000
parents 595ac7759563
children 2804dc8e9ba0
files src/conversation.c
diffstat 1 files changed, 19 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/conversation.c	Mon Sep 04 23:37:32 2000 +0000
+++ b/src/conversation.c	Tue Sep 05 03:17:37 2000 +0000
@@ -1129,20 +1129,31 @@
 	char *buf2 = g_strdup(what);
 	int i;
 	GdkPixmap *face;
+	gboolean in_tag = FALSE;
 
 	for (i = 0; i < strlen(what); i++)
 	{
-		int len;
-		if ((face = is_smiley(window, &what[i], &len)) != NULL) {
-			buf2[y] = 0;
-			gtk_html_append_text(GTK_HTML(html), buf2, (display_options & OPT_DISP_IGNORE_COLOUR) ? HTML_OPTION_NO_COLOURS : 0);
-			gtk_html_add_pixmap(GTK_HTML(html), face, 0, 0);
-			y = 0;
-			i += len - 1;
+		if (!in_tag) {
+			int len;
+			if (what[i] == '<') {
+				buf2[y] = what[i];
+				y++;
+				in_tag = TRUE;
+			} else if ((face = is_smiley(window, &what[i], &len)) != NULL) {
+				buf2[y] = 0;
+				gtk_html_append_text(GTK_HTML(html), buf2, (display_options & OPT_DISP_IGNORE_COLOUR) ? HTML_OPTION_NO_COLOURS : 0);
+				gtk_html_add_pixmap(GTK_HTML(html), face, 0, 0);
+				y = 0;
+				i += len - 1;
+			} else {
+				buf2[y] = what[i];
+				y++;
+			}
 		} else {
 			buf2[y] = what[i];
 			y++;
-
+			if (what[i] == '>')
+				in_tag = FALSE;
 		}
 	}