# HG changeset patch # User Nathan Walp # Date 1080773769 0 # Node ID 848dfa9fe9d405bd546c302ee11be102f0d54a98 # Parent dc818b62379e18668cb5daf80d77b84f960826de [gaim-migrate @ 9279] fix the single quote link thing the right way committer: Tailor Script diff -r dc818b62379e -r 848dfa9fe9d4 src/util.c --- a/src/util.c Wed Mar 31 18:37:06 2004 +0000 +++ b/src/util.c Wed Mar 31 22:56:09 2004 +0000 @@ -1150,13 +1150,23 @@ const char *c, *t, *q = NULL; char *tmp; char url_buf[BUF_LEN * 4]; + gboolean inside_html = FALSE; GString *ret = g_string_new(""); /* Assumes you have a buffer able to cary at least BUF_LEN * 2 bytes */ c = text; while (*c) { - if(!q && (*c == '\"' || *c == '\'')) { - q = c; + if(inside_html) { + if(*c == '>') { + inside_html = FALSE; + } else if(!q && (*c == '\"' || *c == '\'')) { + q = c; + } else if(q) { + if(*c == *q) + q = NULL; + } + } else if(*c == '<') { + inside_html = TRUE; } else if (!g_ascii_strncasecmp(c, "", 3)) { @@ -1336,9 +1346,6 @@ t++; } - } else if(q) { - if(*c == *q) - q = NULL; } if (*c == 0)