--- a/libpurple/protocols/mxit/markup.c Mon Jun 20 06:07:38 2011 +0000
+++ b/libpurple/protocols/mxit/markup.c Mon Jun 20 21:25:52 2011 +0000
@@ -735,6 +735,7 @@
gboolean tag_bold = FALSE;
gboolean tag_under = FALSE;
gboolean tag_italic = FALSE;
purple_debug_info( MXIT_PLUGIN_ID, "Markup RX (original): '%s'\n", message );
@@ -862,59 +863,54 @@
- if ( !( msgflags & CP_MSG_EMOTICON ) ) {
- g_string_append_c( mx->msg, message[i] );
- else if ( i + 1 >= len ) {
g_string_append_c( mx->msg, '.' );
- switch ( message[i+1] ) {
- /* increment text size */
- g_string_append( mx->msg, "<font size=\"+1\">" );
- /* decrement text size */
- g_string_append( mx->msg, "<font size=\"-1\">" );
- /* message too short */
- g_string_append_c( mx->msg, '.' );
+ if ( ( msgflags & CP_MSG_EMOTICON ) && ( message[i+1] == '{' ) ) { + /* message too short */ + g_string_append_c( mx->msg, '.' ); + parse_emoticon_str( &message[i+2], tmpstr1 ); + if ( tmpstr1[0] != '\0' ) { + if ( g_hash_table_lookup( mx->session->iimages, tmpstr1 ) ) { + /* emoticon found in the cache, so we do not have to request it from the WAPsite */ + /* request emoticon from the WAPsite */ + emoticon_request( mx, tmpstr1 ); - parse_emoticon_str( &message[i+2], tmpstr1 );
- if ( tmpstr1[0] != '\0' ) {
+ g_string_append_printf( mx->msg, MXIT_II_TAG"%s>", tmpstr1 ); + i += strlen( tmpstr1 ) + 2; + g_string_append_c( mx->msg, '.' ); + else if ( ( msgflags & CP_MSG_MARKUP ) && ( message[i+1] == '+' ) ) { + /* increment text size */ + g_string_append_printf( mx->msg, "<font size=\"%+i\">", font_size ); + else if ( ( msgflags & CP_MSG_MARKUP ) && ( message[i+1] == '-' ) ) { + /* decrement text size */ + g_string_append_printf( mx->msg, "<font size=\"%+i\">", font_size ); + g_string_append_c( mx->msg, '.' ); - if ( g_hash_table_lookup( mx->session->iimages, tmpstr1 ) ) {
- /* emoticon found in the cache, so we do not have to request it from the WAPsite */
- /* request emoticon from the WAPsite */
- emoticon_request( mx, tmpstr1 );
- g_string_append_printf( mx->msg, MXIT_II_TAG"%s>", tmpstr1 );
- i += strlen( tmpstr1 ) + 2;
- g_string_append_c( mx->msg, '.' );
- g_string_append_c( mx->msg, '.' );