# HG changeset patch # User Yoshiki Yazawa # Date 1219432669 -32400 # Node ID 00e26402de03a64d5e47f4fd86304cddc9adad8f # Parent d512d1d8712fd66f59f077647b614c9b86e67609 apply sanitize_utf() if it is available. diff -r d512d1d8712f -r 00e26402de03 pidgin-twitter.c --- a/pidgin-twitter.c Sat Aug 23 03:59:44 2008 +0900 +++ b/pidgin-twitter.c Sat Aug 23 04:17:49 2008 +0900 @@ -40,6 +40,7 @@ PurpleConversation *conv; } source; +extern gchar *sanitize_utf(const gchar *msg, gsize len, gsize *newlen) __attribute__ ((weak)); /*************/ /* functions */ @@ -783,7 +784,17 @@ /* strip all markups */ if(twitter_ac || wassr_ac || identica_ac) { - gchar *plain = strip_html_markup(*buffer); + gchar *tmp, *plain; + gsize dummy; + + tmp = strip_html_markup(*buffer); + + if(sanitize_utf) { + plain = sanitize_utf(tmp, -1, &dummy); + g_free(tmp); + } + else + plain = tmp; if(wassr_ac) { /* store sending message to address parrot problem */