From 0b3ffb13172c211eed561288d0fd04d76506bb02 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 19 May 2010 20:46:43 +0100 Subject: Setting the HTML flag on a connection has a nasty side effect of escaping a lot of "special" characters, and these HTML entities are not counted as one character. :-( So just strip HTML of incoming stuff and don't do anything with what goes out. It's not required. The story may actually be more complicated this, let's find out. --- protocols/twitter/twitter.c | 1 - protocols/twitter/twitter_lib.c | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'protocols') diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c index 98e85641..a9b38a2f 100644 --- a/protocols/twitter/twitter.c +++ b/protocols/twitter/twitter.c @@ -179,7 +179,6 @@ static void twitter_login( account_t *acc ) twitter_connections = g_slist_append( twitter_connections, ic ); ic->proto_data = td; - ic->flags |= OPT_DOES_HTML; td->user = acc->user; if( !set_getbool( &acc->set, "oauth" ) ) diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c index ee6e39fe..3becc67e 100644 --- a/protocols/twitter/twitter_lib.c +++ b/protocols/twitter/twitter_lib.c @@ -433,6 +433,8 @@ static void twitter_groupchat(struct im_connection *ic, GSList *list) status = l->data; twitter_add_buddy(ic, status->user->screen_name, status->user->name); + strip_html(status->text); + // Say it! if (g_strcasecmp(td->user, status->user->screen_name) == 0) imcb_chat_log (gc, "Your Tweet: %s", status->text); @@ -470,6 +472,7 @@ static void twitter_private_message_chat(struct im_connection *ic, GSList *list) status = l->data; + strip_html( status->text ); if( mode_one ) text = g_strdup_printf( "\002<\002%s\002>\002 %s", status->user->screen_name, status->text ); -- cgit v1.2.3