# HG changeset patch # User Luke Schierer # Date 1080702637 0 # Node ID ef3d81aa663a5e5d8bfa898ccf5be97fc46be6d8 # Parent f9094d171b0485057d26273bb49a8ade71840d6d [gaim-migrate @ 9272] " This patch marks up outgoing links in Yahoo so that the URL is linked instead of the description (as was happening before). It sort-of fixes SimGuy bug #24 - not by disabling the insert link button, but by formatting links such that the link is usable by the recipient. A GAIM_CONNECTION_NO_URLDESCRIPTION connection flag might be useful so we don't bother asking for a description if the protocol (eg. MSN, Yahoo & Zephyr) doesn't support it in links, but I'll leave that for another day, another patch." --Stu Tomlinson committer: Tailor Script diff -r f9094d171b04 -r ef3d81aa663a src/protocols/yahoo/util.c --- a/src/protocols/yahoo/util.c Wed Mar 31 02:52:09 2004 +0000 +++ b/src/protocols/yahoo/util.c Wed Mar 31 03:10:37 2004 +0000 @@ -592,16 +592,28 @@ i = t - src; break; } - } else if (!g_ascii_strncasecmp(&src[i+1], "A", j - i - 1)) { - while (1) { - if (++j >= len) { - g_string_append(dest, &src[i]); + } else if (!g_ascii_strncasecmp(&src[i+1], "A HREF=\"", j - i - 1)) { + j += 7; + g_string_append(dest, "\033[lm"); + while (1) { + g_string_append_c(dest, src[j]); + if (++j >= len) { i = len; break; } - if (src[j] == '>') { - g_string_append(dest, "\033[lm"); - i = j; + if (src[j] == '"') { + g_string_append(dest, "\033[xlm"); + while (1) { + if (++j >= len) { + i = len; + break; + } + if (!g_ascii_strncasecmp(&src[j], "", 4)) { + j += 3; + break; + } + } + i = j; break; } }