Mercurial > pidgin
comparison src/util.c @ 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 | 96415a3aa93c |
children | dabfa4184db8 |
comparison
equal
deleted
inserted
replaced
9076:aad506cde4f3 | 9077:13e809489beb |
---|---|
1339 if(*c == *q) | 1339 if(*c == *q) |
1340 q = NULL; | 1340 q = NULL; |
1341 } | 1341 } |
1342 } else if(*c == '<') { | 1342 } else if(*c == '<') { |
1343 inside_html = TRUE; | 1343 inside_html = TRUE; |
1344 } else if (!g_ascii_strncasecmp(c, "<A", 2)) { | 1344 if (!g_ascii_strncasecmp(c, "<A", 2)) { |
1345 while (1) { | 1345 while (1) { |
1346 if (!g_ascii_strncasecmp(c, "/A>", 3)) { | 1346 if (!g_ascii_strncasecmp(c, "/A>", 3)) { |
1347 break; | 1347 inside_html = FALSE; |
1348 } | 1348 break; |
1349 ret = g_string_append_c(ret, *c); | 1349 } |
1350 c++; | 1350 ret = g_string_append_c(ret, *c); |
1351 if (!(*c)) | 1351 c++; |
1352 break; | 1352 if (!(*c)) |
1353 break; | |
1354 } | |
1353 } | 1355 } |
1354 } else if ((*c=='h') && (!g_ascii_strncasecmp(c, "http://", 7) || | 1356 } else if ((*c=='h') && (!g_ascii_strncasecmp(c, "http://", 7) || |
1355 (!g_ascii_strncasecmp(c, "https://", 8)))) { | 1357 (!g_ascii_strncasecmp(c, "https://", 8)))) { |
1356 t = c; | 1358 t = c; |
1357 while (1) { | 1359 while (1) { |