| 387 end++; |
387 end++; |
| 388 |
388 |
| 389 if ( end == mx->msg->len ) /* end of emoticon tag not found */ |
389 if ( end == mx->msg->len ) /* end of emoticon tag not found */ |
| 390 break; |
390 break; |
| 391 |
391 |
| 392 memset( ii, 0x00, sizeof( ii ) ); |
392 ii = g_strndup(&mx->msg->str[emo_ofs], end - emo_ofs); |
| 393 memcpy( ii, &mx->msg->str[emo_ofs], end - emo_ofs ); |
|
| 394 |
393 |
| 395 /* remove inline image tag */ |
394 /* remove inline image tag */ |
| 396 g_string_erase( mx->msg, start, ( end - start ) + 1 ); |
395 g_string_erase( mx->msg, start, ( end - start ) + 1 ); |
| 397 |
396 |
| 398 /* find the image entry */ |
397 /* find the image entry */ |
| 406 g_snprintf( tag, sizeof( tag ), |
405 g_snprintf( tag, sizeof( tag ), |
| 407 "<img src=\"" PURPLE_STORED_IMAGE_PROTOCOL "%i\">", |
406 "<img src=\"" PURPLE_STORED_IMAGE_PROTOCOL "%i\">", |
| 408 *img_id ); |
407 *img_id ); |
| 409 g_string_insert( mx->msg, start, tag ); |
408 g_string_insert( mx->msg, start, tag ); |
| 410 } |
409 } |
| |
410 |
| |
411 g_free(ii); |
| 411 } |
412 } |
| 412 } |
413 } |
| 413 |
414 |
| 414 #ifdef MXIT_DEBUG_MARKUP |
415 #ifdef MXIT_DEBUG_MARKUP |
| 415 purple_debug_info( MXIT_PLUGIN_ID, "Markup RX (converted): '%s'\n", mx->msg->str ); |
416 purple_debug_info( MXIT_PLUGIN_ID, "Markup RX (converted): '%s'\n", mx->msg->str ); |