Mercurial > pidgin-twitter
changeset 207:0eac0abcc0aa
improved parrot blocker. the string to be pushed should not be escaped.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Fri, 22 Aug 2008 19:19:52 +0900 |
parents | 99c4946e8449 |
children | 5d1b8528e144 |
files | pidgin-twitter.c |
diffstat | 1 files changed, 17 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- 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 */