# HG changeset patch # User Yoshiki Yazawa # Date 1219400392 -32400 # Node ID 0eac0abcc0aad4514b007e3d507f6b27e1319986 # Parent 99c4946e84497810abedfb6c5456f5acba77b179 improved parrot blocker. the string to be pushed should not be escaped. diff -r 99c4946e8449 -r 0eac0abcc0aa pidgin-twitter.c --- a/pidgin-twitter.c Fri Aug 22 16:47:37 2008 +0900 +++ b/pidgin-twitter.c Fri Aug 22 19:19:52 2008 +0900 @@ -782,19 +782,23 @@ identica_ac = is_identica_account(account, recipient); /* strip all markups */ - if(twitter_ac || wassr_ac || identica_ac) - strip_markup(buffer, TRUE); - - if(wassr_ac) { - /* store sending message to address parrot problem */ - g_strlcpy(wassr_post, *buffer, WASSR_POST_LEN); - twitter_debug("wassr parrot pushed:%s\n", *buffer); - } - - if(identica_ac) { - /* store sending message to address parrot problem */ - g_strlcpy(identica_post, *buffer, IDENTICA_POST_LEN); - twitter_debug("identica parrot pushed:%s\n", *buffer); + if(twitter_ac || wassr_ac || identica_ac) { + gchar *plain = strip_html_markup(*buffer); + + if(wassr_ac) { + /* store sending message to address parrot problem */ + g_strlcpy(wassr_post, plain, WASSR_POST_LEN); + twitter_debug("wassr parrot pushed:%s\n", *buffer); + } + else if(identica_ac) { + /* store sending message to address parrot problem */ + g_strlcpy(identica_post, plain, IDENTICA_POST_LEN); + twitter_debug("identica parrot pushed:%s\n", *buffer); + } + + g_free(*buffer); + *buffer = g_markup_escape_text(plain, -1); + g_free(plain); } /* return here if the message is not to twitter */