comparison src/util.c @ 9273:227d3d6c6565

[gaim-migrate @ 10076] this fixes a logging issue with apostrophes committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sat, 12 Jun 2004 21:48:49 +0000
parents 15d516d07d57
children 185fbd8b5998
comparison
equal deleted inserted replaced
9272:ac4480944fc3 9273:227d3d6c6565
1330 else if (!g_ascii_isspace(str2[i])) 1330 else if (!g_ascii_isspace(str2[i]))
1331 { 1331 {
1332 visible = TRUE; 1332 visible = TRUE;
1333 } 1333 }
1334 1334
1335 /* XXX: This sucks. We need to be un-escaping all entities, which
1336 * includes these, as well as the &#num; ones */
1337
1335 if (str2[i] == '&' && strncasecmp(str2 + i, "&quot;", 6) == 0) 1338 if (str2[i] == '&' && strncasecmp(str2 + i, "&quot;", 6) == 0)
1336 { 1339 {
1337 str2[j++] = '\"'; 1340 str2[j++] = '\"';
1338 i = i + 5; 1341 i = i + 5;
1339 continue; 1342 continue;
1355 1358
1356 if (str2[i] == '&' && strncasecmp(str2 + i, "&gt;", 4) == 0) 1359 if (str2[i] == '&' && strncasecmp(str2 + i, "&gt;", 4) == 0)
1357 { 1360 {
1358 str2[j++] = '>'; 1361 str2[j++] = '>';
1359 i = i + 3; 1362 i = i + 3;
1363 continue;
1364 }
1365
1366 if (str2[i] == '&' && strncasecmp(str2 + i, "&apos;", 6) == 0)
1367 {
1368 str2[j++] = '\'';
1369 i = i + 5;
1360 continue; 1370 continue;
1361 } 1371 }
1362 1372
1363 if (visible) 1373 if (visible)
1364 str2[j++] = g_ascii_isspace(str2[i])? ' ': str2[i]; 1374 str2[j++] = g_ascii_isspace(str2[i])? ' ': str2[i];