comparison pidgin-twitter.c @ 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 bc1448e72b1b
children 5d1b8528e144
comparison
equal deleted inserted replaced
206:99c4946e8449 207:0eac0abcc0aa
780 twitter_ac = is_twitter_account(account, recipient); 780 twitter_ac = is_twitter_account(account, recipient);
781 wassr_ac = is_wassr_account(account, recipient); 781 wassr_ac = is_wassr_account(account, recipient);
782 identica_ac = is_identica_account(account, recipient); 782 identica_ac = is_identica_account(account, recipient);
783 783
784 /* strip all markups */ 784 /* strip all markups */
785 if(twitter_ac || wassr_ac || identica_ac) 785 if(twitter_ac || wassr_ac || identica_ac) {
786 strip_markup(buffer, TRUE); 786 gchar *plain = strip_html_markup(*buffer);
787 787
788 if(wassr_ac) { 788 if(wassr_ac) {
789 /* store sending message to address parrot problem */ 789 /* store sending message to address parrot problem */
790 g_strlcpy(wassr_post, *buffer, WASSR_POST_LEN); 790 g_strlcpy(wassr_post, plain, WASSR_POST_LEN);
791 twitter_debug("wassr parrot pushed:%s\n", *buffer); 791 twitter_debug("wassr parrot pushed:%s\n", *buffer);
792 } 792 }
793 793 else if(identica_ac) {
794 if(identica_ac) { 794 /* store sending message to address parrot problem */
795 /* store sending message to address parrot problem */ 795 g_strlcpy(identica_post, plain, IDENTICA_POST_LEN);
796 g_strlcpy(identica_post, *buffer, IDENTICA_POST_LEN); 796 twitter_debug("identica parrot pushed:%s\n", *buffer);
797 twitter_debug("identica parrot pushed:%s\n", *buffer); 797 }
798
799 g_free(*buffer);
800 *buffer = g_markup_escape_text(plain, -1);
801 g_free(plain);
798 } 802 }
799 803
800 /* return here if the message is not to twitter */ 804 /* return here if the message is not to twitter */
801 if(!twitter_ac) 805 if(!twitter_ac)
802 return FALSE; 806 return FALSE;