# HG changeset patch # User Eric Warmenhoven # Date 1009008517 0 # Node ID 4df759d607f3b98da43e454af4a5efa1d8edf3f6 # Parent 93e2c99ccf50e5c8bc21c5e4a736cea712a2c7f2 [gaim-migrate @ 2931] this was a bad hack. committer: Tailor Script diff -r 93e2c99ccf50 -r 4df759d607f3 src/conversation.c --- a/src/conversation.c Sat Dec 22 04:02:29 2001 +0000 +++ b/src/conversation.c Sat Dec 22 08:08:37 2001 +0000 @@ -1151,43 +1151,6 @@ g_free(s); } -static char *escape_html(char *w, int *l) -{ - int c = 0; - char *r; - int i, x = 0; - if (*l == -1) { - *l = strlen(w); - x = 1; - } - r = g_malloc(*l * 5 + 1); - - for (i = 0; i < *l; i++) { - if (w[i] == '<') { - r[c++] = '&'; - r[c++] = 'l'; - r[c++] = 't'; - r[c++] = ';'; - } else if (w[i] == '&') { - r[c++] = '&'; - r[c++] = 'a'; - r[c++] = 'm'; - r[c++] = 'p'; - r[c++] = ';'; - } else { - r[c++] = w[i]; - } - } - r[c] = 0; - - r = g_realloc(r, c + 1); - if (x) - *l = -1; - else - *l = c; - return r; -} - static char *html_logize(char *p) { @@ -1592,10 +1555,6 @@ g_snprintf(buf, BUF_LONG, "%s
", what); gtk_imhtml_append_text(GTK_IMHTML(c->text), buf, -1, 0); } else { - if (c->gc->flags & OPT_CONN_SHOW_HTML) - what = g_memdup(what, length == -1 ? strlen(what) + 1 : length); - else - what = escape_html(what, &length); if (flags & WFLAG_WHISPER) { /* if we're whispering, it's not an autoresponse */ if (meify(what, length)) { @@ -1702,8 +1661,6 @@ g_free(t2); g_free(nm); } - - g_free(what); } if ((c->is_chat && (chat_options & OPT_CHAT_POPUP)) || diff -r 93e2c99ccf50 -r 4df759d607f3 src/multi.h --- a/src/multi.h Sat Dec 22 04:02:29 2001 +0000 +++ b/src/multi.h Sat Dec 22 08:08:37 2001 +0000 @@ -74,7 +74,6 @@ }; #define OPT_CONN_HTML 0x00000001 -#define OPT_CONN_SHOW_HTML 0x00000002 struct proto_user_opt { char *label; diff -r 93e2c99ccf50 -r 4df759d607f3 src/protocols/irc/irc.c --- a/src/protocols/irc/irc.c Sat Dec 22 04:02:29 2001 +0000 +++ b/src/protocols/irc/irc.c Sat Dec 22 08:08:37 2001 +0000 @@ -1073,8 +1073,6 @@ struct irc_data *idata = gc->proto_data = g_new0(struct irc_data, 1); g_snprintf(gc->displayname, sizeof(gc->displayname), "%s", gc->username); - gc->flags = OPT_CONN_SHOW_HTML; /* this is bad. the reason for this is gtkimhtml doesn't - understand the xchat escapes. so we translate. */ g_snprintf(buf, sizeof(buf), "Signon: %s", gc->username); set_login_progress(gc, 2, buf); diff -r 93e2c99ccf50 -r 4df759d607f3 src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Sat Dec 22 04:02:29 2001 +0000 +++ b/src/protocols/oscar/oscar.c Sat Dec 22 08:08:37 2001 +0000 @@ -460,7 +460,7 @@ gc->password[9] = 0; } else { gc->protocol = PROTO_TOC; - gc->flags |= OPT_CONN_HTML | OPT_CONN_SHOW_HTML; + gc->flags |= OPT_CONN_HTML; } sess = g_new0(aim_session_t, 1); diff -r 93e2c99ccf50 -r 4df759d607f3 src/protocols/toc/toc.c --- a/src/protocols/toc/toc.c Sat Dec 22 04:02:29 2001 +0000 +++ b/src/protocols/toc/toc.c Sat Dec 22 08:08:37 2001 +0000 @@ -143,7 +143,7 @@ gc = new_gaim_conn(user); gc->proto_data = tdt = g_new0(struct toc_data, 1); - gc->flags |= OPT_CONN_HTML | OPT_CONN_SHOW_HTML; + gc->flags |= OPT_CONN_HTML; g_snprintf(buf, sizeof buf, "Looking up %s", user->proto_opt[USEROPT_AUTH][0] ? user->proto_opt[USEROPT_AUTH] : TOC_HOST); diff -r 93e2c99ccf50 -r 4df759d607f3 src/protocols/yahoo/yahoo.c --- a/src/protocols/yahoo/yahoo.c Sat Dec 22 04:02:29 2001 +0000 +++ b/src/protocols/yahoo/yahoo.c Sat Dec 22 08:08:37 2001 +0000 @@ -707,8 +707,6 @@ struct gaim_connection *gc = new_gaim_conn(user); struct yahoo_data *yd = gc->proto_data = g_new0(struct yahoo_data, 1); - gc->flags = OPT_CONN_HTML | OPT_CONN_SHOW_HTML; /* it does to an extent.... */ - set_login_progress(gc, 1, "Connecting"); yd->fd = -1;