Mercurial > pidgin
comparison src/protocols/yahoo/yahoo.c @ 9224:3e0cd1c6ddc7
[gaim-migrate @ 10020]
This fixes a weird bug i ran into where Gaim was crashing apparently
because on of my buddy's status messages started with a <
I wonder if this wasn't really a bug with gaim_markup_strip_html
Either way, Yahoo status messages aren't html, so lets not strip them.
Besides we escape the markup anyway.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Sun, 06 Jun 2004 20:31:20 +0000 |
parents | 8054855f2bb9 |
children | 185fbd8b5998 |
comparison
equal
deleted
inserted
replaced
9223:f46154d6de2b | 9224:3e0cd1c6ddc7 |
---|---|
2449 | 2449 |
2450 static char *yahoo_status_text(GaimBuddy *b) | 2450 static char *yahoo_status_text(GaimBuddy *b) |
2451 { | 2451 { |
2452 struct yahoo_data *yd = (struct yahoo_data*)b->account->gc->proto_data; | 2452 struct yahoo_data *yd = (struct yahoo_data*)b->account->gc->proto_data; |
2453 struct yahoo_friend *f = NULL; | 2453 struct yahoo_friend *f = NULL; |
2454 char *stripped = NULL; | |
2455 | 2454 |
2456 f = g_hash_table_lookup(yd->friends, b->name); | 2455 f = g_hash_table_lookup(yd->friends, b->name); |
2457 if (!f) | 2456 if (!f) |
2458 return g_strdup(_("Not on server list")); | 2457 return g_strdup(_("Not on server list")); |
2459 | 2458 |
2465 return g_strdup(yahoo_get_status_string(f->status)); | 2464 return g_strdup(yahoo_get_status_string(f->status)); |
2466 return NULL; | 2465 return NULL; |
2467 case YAHOO_STATUS_CUSTOM: | 2466 case YAHOO_STATUS_CUSTOM: |
2468 if (!f->msg) | 2467 if (!f->msg) |
2469 return NULL; | 2468 return NULL; |
2470 stripped = gaim_markup_strip_html(f->msg); | 2469 return g_markup_escape_text(f->msg, strlen(f->msg)); |
2471 if (stripped) { | 2470 |
2472 char *ret = g_markup_escape_text(stripped, strlen(stripped)); | |
2473 g_free(stripped); | |
2474 return ret; | |
2475 } | |
2476 return NULL; | |
2477 default: | 2471 default: |
2478 return g_strdup(yahoo_get_status_string(f->status)); | 2472 return g_strdup(yahoo_get_status_string(f->status)); |
2479 } | 2473 } |
2480 } | 2474 } |
2481 | 2475 |
2497 } | 2491 } |
2498 return NULL; | 2492 return NULL; |
2499 case YAHOO_STATUS_CUSTOM: | 2493 case YAHOO_STATUS_CUSTOM: |
2500 if (!f->msg) | 2494 if (!f->msg) |
2501 return NULL; | 2495 return NULL; |
2502 status = gaim_markup_strip_html(f->msg); | 2496 status = g_strdup(f->msg); |
2503 break; | 2497 break; |
2504 default: | 2498 default: |
2505 status = g_strdup(yahoo_get_status_string(f->status)); | 2499 status = g_strdup(yahoo_get_status_string(f->status)); |
2506 break; | 2500 break; |
2507 } | 2501 } |