Changeset c572dd6


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.

Files:
3 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • doc/user-guide/commands.xml

    r2dff6f7 rc572dd6  
    303303        </bitlbee-setting>
    304304
    305         <bitlbee-setting name="html" type="string">
    306                 <default>nostrip</default>
    307                 <possible-values>strip, nostrip</possible-values>
    308 
    309                 <description>
    310                         <para>
    311                                 Determines what BitlBee should do with HTML in messages. If set to nostrip, HTML in messages will not be touched. If set to strip, all HTML will be stripped from messages. Unfortunately this sometimes strips too much.
     305        <bitlbee-setting name="strip_html" type="boolean">
     306                <default>True</default>
     307
     308                <description>
     309                        <para>
     310                                Determines what BitlBee should do with HTML in messages. Normally this is turned on and HTML will be stripped from messages, if BitlBee thinks there is HTML.
     311                        </para>
     312                        <para>
     313                                If BitlBee fails to detect this sometimes (most likely in AIM messages over an ICQ connection), you can set this setting to <emphasis>always</emphasis>, but this might sometimes accidentally strip non-HTML things too.
    312314                        </para>
    313315                </description>
  • irc.c

    r2dff6f7 rc572dd6  
    121121        set_add( irc, "display_namechanges", "false", set_eval_bool );
    122122        set_add( irc, "handle_unknown", "root", NULL );
    123         /* set_add( irc, "html", "nostrip", NULL ); */
    124123        set_add( irc, "lcnicks", "true", set_eval_bool );
    125124        set_add( irc, "ops", "both", set_eval_ops );
     
    127126        set_add( irc, "query_order", "lifo", NULL );
    128127        set_add( irc, "save_on_quit", "true", set_eval_bool );
     128        set_add( irc, "strip_html", "true", NULL );
    129129        set_add( irc, "to_char", ": ", set_eval_to_char );
    130130        set_add( irc, "typing_notice", "false", set_eval_bool );
  • 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.