Changeset 0b3ffb1


Ignore:
Timestamp:
2010-05-19T19:46:43Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
907afe1
Parents:
2334048
Message:

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.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lib/misc.c

    r2334048 r0b3ffb1  
    154154{
    155155        char *start = in;
    156         char *out = g_malloc( strlen( in ) + 1 );
     156        char out[strlen(in)+1];
    157157        char *s = out, *cs;
    158158        int i, matched;
    159159       
    160         memset( out, 0, strlen( in ) + 1 );
     160        memset( out, 0, sizeof( out ) );
    161161       
    162162        while( *in )
     
    220220       
    221221        strcpy( start, out );
    222         g_free( out );
    223222}
    224223
  • protocols/twitter/twitter.c

    r2334048 r0b3ffb1  
    180180        twitter_connections = g_slist_append( twitter_connections, ic );
    181181        ic->proto_data = td;
    182         ic->flags |= OPT_DOES_HTML;
    183182       
    184183        td->user = acc->user;
  • protocols/twitter/twitter_lib.c

    r2334048 r0b3ffb1  
    434434                twitter_add_buddy(ic, status->user->screen_name, status->user->name);
    435435               
     436                strip_html(status->text);
     437               
    436438                // Say it!
    437439                if (g_strcasecmp(td->user, status->user->screen_name) == 0)
     
    471473                status = l->data;
    472474               
     475                strip_html( status->text );
    473476                if( mode_one )
    474477                        text = g_strdup_printf( "\002<\002%s\002>\002 %s",
Note: See TracChangeset for help on using the changeset viewer.