Mercurial > pidgin-twitter
changeset 210:00e26402de03
apply sanitize_utf() if it is available.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sat, 23 Aug 2008 04:17:49 +0900 |
parents | d512d1d8712f |
children | e13103257b33 |
files | pidgin-twitter.c |
diffstat | 1 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 */