Mercurial > pidgin-twitter
diff main.c @ 337:9f78fb6bfc76
gtkimhtml easily be fooled if the buffer is not entity markuped.
| author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
|---|---|
| date | Thu, 15 Oct 2009 15:49:12 +0900 |
| parents | 8de140bc8d13 |
| children | 6ee1ed15688c |
line wrap: on
line diff
--- a/main.c Wed Oct 14 14:55:55 2009 +0900 +++ b/main.c Thu Oct 15 15:49:12 2009 +0900 @@ -363,6 +363,7 @@ gint service = get_service_type(conv); gchar *linkstr = NULL, *tmpstr = NULL; + gchar *escaped = NULL; /* check if the conversation is between twitter */ if(service == unknown_service) @@ -398,10 +399,24 @@ } } /* send */ + + /* note: + link string needs stripped plain text. + displaying needs markup-escaped that text. */ + /* strip all markups */ -// strip_markup(buffer, TRUE); strip_markup(buffer, FALSE); + /* make R F RT link string */ + if(service == twitter_service) + linkstr = twitter_rip_link_string(buffer); + + /* entity markup for displaying */ + escaped = g_markup_escape_text(*buffer, -1); + g_free(*buffer); + *buffer = escaped; + + /* playsound */ if(purple_prefs_get_bool(OPT_PLAYSOUND_SENDER)) { playsound(buffer, SENDER); @@ -410,10 +425,6 @@ playsound(buffer, RECIPIENT); } - /* make R F RT link */ - if(service == twitter_service) - linkstr = twitter_make_link_string(buffer); - /* translate */ if(purple_prefs_get_bool(OPT_TRANSLATE_SENDER)) { if(service == ffeed_service)
