Changeset c572dd6 for protocols


Ignore:
Timestamp:
2005-11-18T12:41:58Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
517ecc4
Parents:
2dff6f7
Message:

HTML stripping is optional again (but still safer than before 0.93), but now enabled by default.

Location:
protocols
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.c

    r2dff6f7 rc572dd6  
    247247                msg = text;
    248248       
    249         /* if( g_strcasecmp( set_getstr(gc->irc, "html" ), "strip" ) == 0 ) */
    250         if( gc->flags & OPT_CONN_HTML )
     249        if( ( g_strcasecmp( set_getstr( gc->irc, "strip_html" ), "always" ) == 0 ) ||
     250            ( ( gc->flags & OPT_CONN_HTML ) && set_getint( gc->irc, "strip_html" ) ) )
    251251                strip_html( msg );
    252252       
     
    637637        }
    638638       
    639         /* if( g_strcasecmp( set_getstr( irc, "html" ), "strip" ) == 0 ) */
    640         if( gc->flags & OPT_CONN_HTML )
     639        if( ( g_strcasecmp( set_getstr( gc->irc, "strip_html" ), "always" ) == 0 ) ||
     640            ( ( gc->flags & OPT_CONN_HTML ) && set_getint( gc->irc, "strip_html" ) ) )
    641641                strip_html( msg );
    642642
     
    737737        for( c = gc->conversations; c && c->id != id; c = c->next );
    738738       
    739         /* if( g_strcasecmp( set_getstr( gc->irc, "html" ), "strip" ) == 0 ) */
    740         if( gc->flags & OPT_CONN_HTML )
     739        if( ( g_strcasecmp( set_getstr( gc->irc, "strip_html" ), "always" ) == 0 ) ||
     740            ( ( gc->flags & OPT_CONN_HTML ) && set_getint( gc->irc, "strip_html" ) ) )
    741741                strip_html( msg );
    742742       
     
    970970                msg = buf;
    971971
    972         if( u->gc->flags & OPT_CONN_HTML) {
    973                 char * html = escape_html(msg);
    974                 strncpy(buf, html, 8192);
    975                 g_free(html);
     972        if( ( u->gc->flags & OPT_CONN_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) )
     973        {
     974                char *html;
     975               
     976                html = escape_html( msg );
     977                strncpy( buf, html, 8192 );
     978                g_free( html );
     979               
     980                msg = buf;
    976981        }
    977982       
  • protocols/util.c

    r2dff6f7 rc572dd6  
    377377        if( html == NULL )
    378378                return( NULL );
    379         if( g_strncasecmp( html, "<html>", 6 ) == 0 )
    380                 return( g_strdup( html ) );
    381379       
    382380        ret = g_string_new( "" );
  • protocols/yahoo/yahoo.c

    r2dff6f7 rc572dd6  
    851851        if( c )
    852852                add_chat_buddy( c, who );
    853         else if( set_getint( gc->irc, "debug" ) )
    854                 serv_got_crap( gc, "Got ext_yahoo_conf_userjoin() from %s for unknown conference %s", who, room );
    855853}
    856854
     
    864862        if( c )
    865863                remove_chat_buddy( c, who, "" );
    866         else if( set_getint( gc->irc, "debug" ) )
    867                 serv_got_crap( gc, "Got ext_yahoo_conf_userleave() from %s for unknown conference %s", who, room );
    868864}
    869865
Note: See TracChangeset for help on using the changeset viewer.