changeset 9077:13e809489beb

[gaim-migrate @ 9853] nosnilmot found that there continued to be bugs in our linkification on yahoo (and probably msn). He wrote: "Tim, Something's still not quite right, this is on Yahoo - insert link -> http://www.google.com/ -> send (the signals-test plugin is quite useful here!) - nested links now instead of duplicate links: (07:12:48) signals test: writing-im-msg (nosnilmot26, nosnilmot26, <a href="http://www.google.com/"><A HREF="http://www.google.com/">http://www.google.com/</A></a>) Anyway, that problem is NOT in imhtml, so I managed to do something about it - gaim_markup_linkify was never actually detecting the "<A" tag because it was an else-if on checking for "<". The patch attached fixes that so gaim_markup_linkify will not try to linkify stuff that's already inside a link Regards, Stu." committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Wed, 26 May 2004 23:24:44 +0000
parents aad506cde4f3
children f06013ff80d9
files src/util.c
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/util.c	Wed May 26 20:23:07 2004 +0000
+++ b/src/util.c	Wed May 26 23:24:44 2004 +0000
@@ -1341,15 +1341,17 @@
 			}
 		} else if(*c == '<') {
 			inside_html = TRUE;
-		} else if (!g_ascii_strncasecmp(c, "<A", 2)) {
-			while (1) {
-				if (!g_ascii_strncasecmp(c, "/A>", 3)) {
-					break;
+			if (!g_ascii_strncasecmp(c, "<A", 2)) {
+				while (1) {
+					if (!g_ascii_strncasecmp(c, "/A>", 3)) {
+						inside_html = FALSE;
+						break;
+					}
+					ret = g_string_append_c(ret, *c);
+					c++;
+					if (!(*c))
+						break;
 				}
-				ret = g_string_append_c(ret, *c);
-				c++;
-				if (!(*c))
-					break;
 			}
 		} else if ((*c=='h') && (!g_ascii_strncasecmp(c, "http://", 7) ||
 					(!g_ascii_strncasecmp(c, "https://", 8)))) {