changeset 1703:acce65ffdc80

[gaim-migrate @ 1713] better quote handling in tags? committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 12 Apr 2001 19:29:24 +0000
parents 70f9d7cdb127
children 07097db15338
files src/gtkimhtml.c
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkimhtml.c	Thu Apr 12 17:45:12 2001 +0000
+++ b/src/gtkimhtml.c	Thu Apr 12 19:29:24 2001 +0000
@@ -2159,7 +2159,7 @@
 {
 	const gchar *c;
 	gboolean intag = FALSE;
-	gboolean tagquote = FALSE;
+	gint tagquote = 0;
 	gboolean incomment = FALSE;
 	gchar *ws;
 	gchar *tag;
@@ -2205,7 +2205,7 @@
 
 	while (*c) {
 		if (*c == '<') {
-			if (intag && !tagquote) {
+			if (intag && (tagquote != 1)) {
 				char *d;
 				tag [tpos] = 0;
 				d = tag;
@@ -2264,6 +2264,7 @@
 
 			tag [tpos++] = *c++;
 			intag = TRUE;
+			tagquote = 0;
 		} else if (incomment && (*c == '-') && !g_strncasecmp (c, "-->", strlen ("-->"))) {
 			gchar *tmp;
 			ws [wpos] = 0;
@@ -2278,7 +2279,7 @@
 			NEW_BIT (NEW_COMMENT_BIT);
 			incomment = FALSE;
 			c += strlen ("-->");
-		} else if (*c == '>' && intag && !tagquote) {
+		} else if (*c == '>' && intag && (tagquote != 1)) {
 			gboolean got_tag = FALSE;
 			tag [tpos++] = *c++;
 			tag [tpos] = 0;
@@ -2822,7 +2823,7 @@
 			}
 		} else if (intag) {
 			if (*c == '\"')
-				tagquote = !tagquote;
+				tagquote++;
 			tag [tpos++] = *c++;
 		} else if (incomment) {
 			ws [wpos++] = *c++;