diff options
| -rw-r--r-- | lib/misc.c | 5 | ||||
| -rw-r--r-- | protocols/twitter/twitter.c | 1 | ||||
| -rw-r--r-- | protocols/twitter/twitter_lib.c | 3 | 
3 files changed, 5 insertions, 4 deletions
| @@ -153,11 +153,11 @@ static const htmlentity_t ent[] =  void strip_html( char *in )  {  	char *start = in; -	char *out = g_malloc( strlen( in ) + 1 ); +	char out[strlen(in)+1];  	char *s = out, *cs;  	int i, matched; -	memset( out, 0, strlen( in ) + 1 ); +	memset( out, 0, sizeof( out ) );  	while( *in )  	{ @@ -219,7 +219,6 @@ void strip_html( char *in )  	}  	strcpy( start, out ); -	g_free( out );  }  char *escape_html( const char *html ) 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 ); | 
