diff src/util.c @ 5093:89c0c811befa

[gaim-migrate @ 5455] jabber XHTML support. since people tend to not like to write valid XHTML all of the time, we now have html_to_xhtml() which does its best to figure out what you meant. i'm tired, hope this works for everyone committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 10 Apr 2003 06:09:26 +0000
parents a96653493416
children 381da05cb5ed
line wrap: on
line diff
--- a/src/util.c	Thu Apr 10 00:57:06 2003 +0000
+++ b/src/util.c	Thu Apr 10 06:09:26 2003 +0000
@@ -139,7 +139,7 @@
 
 gint linkify_text(char *text)
 {
-	char *c, *t;
+	char *c, *t, *q = NULL;
 	char *cpy = g_malloc(strlen(text) * 3 + 1);
 	char url_buf[BUF_LEN * 4];
 	int cnt = 0;
@@ -149,7 +149,12 @@
 	cpy[strlen(text)] = 0;
 	c = cpy;
 	while (*c) {
-		if (!g_ascii_strncasecmp(c, "<A", 2)) {
+		if(!q && (*c == '\"' || *c == '\'')) {
+			q = c;
+		} else if(q) {
+			if(*c == *q)
+				q = NULL;
+		} else if (!g_ascii_strncasecmp(c, "<A", 2)) {
 			while (1) {
 				if (!g_ascii_strncasecmp(c, "/A>", 3)) {
 					break;