comparison src/util.c @ 12640:de306144dc8a

[gaim-migrate @ 14976] Yahoo profiles use links of this form: <a href="http://gaim.sf.net">gaim.sf.net</a> The Yahoo prpl strips HTML, manipulates the text, then passes it to the core, which passes to the UI, which calls another UI function which calls ...linkify. This leads to these URLs looking quite odd. The fix is to have the HTML stripping function deal properly with URLs of the above format. With HTTP being the most common type of URL these days, that's probably a good plan anyway. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Fri, 23 Dec 2005 06:48:27 +0000
parents 26647ddcc9c5
children 26b31b4c43a2
comparison
equal deleted inserted replaced
12639:366326fa9cb4 12640:de306144dc8a
1355 { 1355 {
1356 1356
1357 size_t hrlen = strlen(href); 1357 size_t hrlen = strlen(href);
1358 1358
1359 /* Only insert the href if it's different from the CDATA. */ 1359 /* Only insert the href if it's different from the CDATA. */
1360 if (hrlen != j - href_st || 1360 if ((hrlen != j - href_st ||
1361 strncmp(str2 + href_st, href, hrlen)) 1361 strncmp(str2 + href_st, href, hrlen)) &&
1362 (hrlen != j - href_st + 7 || /* 7 == strlen("http://") */
1363 strncmp(str2 + href_st, href + 7, hrlen - 7)))
1362 { 1364 {
1363 str2[j++] = ' '; 1365 str2[j++] = ' ';
1364 str2[j++] = '('; 1366 str2[j++] = '(';
1365 g_memmove(str2 + j, href, hrlen); 1367 g_memmove(str2 + j, href, hrlen);
1366 j += hrlen; 1368 j += hrlen;