aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2008-07-21 02:14:05 +0800
committerXavier Claessens <xclaesse@gmail.com>2009-06-12 00:06:30 +0800
commit38c22ce23b3b600a249c2d6145e50430734d8787 (patch)
treebd048bd765c0bc53befc19f4c0ec02b94b4616aa
parent3e384cce2caa2729cc9a9409f115fcf117701384 (diff)
downloadgsoc2013-empathy-38c22ce23b3b600a249c2d6145e50430734d8787.tar
gsoc2013-empathy-38c22ce23b3b600a249c2d6145e50430734d8787.tar.gz
gsoc2013-empathy-38c22ce23b3b600a249c2d6145e50430734d8787.tar.bz2
gsoc2013-empathy-38c22ce23b3b600a249c2d6145e50430734d8787.tar.lz
gsoc2013-empathy-38c22ce23b3b600a249c2d6145e50430734d8787.tar.xz
gsoc2013-empathy-38c22ce23b3b600a249c2d6145e50430734d8787.tar.zst
gsoc2013-empathy-38c22ce23b3b600a249c2d6145e50430734d8787.zip
Don't escape message before detecting smileys otherwise some won't be detected.
-rw-r--r--libempathy-gtk/empathy-theme-adium.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index 2b2504ffd..da0028e4e 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -217,16 +217,14 @@ theme_adium_parse_body (EmpathyThemeAdium *theme,
gchar *ret = NULL;
gint prev;
- ret = g_markup_escape_text (text, -1);
-
empathy_conf_get_bool (empathy_conf_get (),
EMPATHY_PREFS_CHAT_SHOW_SMILEYS,
&use_smileys);
if (use_smileys) {
/* Replace smileys by a <img/> tag */
- string = g_string_sized_new (strlen (ret));
- smileys = empathy_smiley_manager_parse (priv->smiley_manager, ret);
+ string = g_string_sized_new (strlen (text));
+ smileys = empathy_smiley_manager_parse (priv->smiley_manager, text);
for (l = smileys; l; l = l->next) {
EmpathySmiley *smiley;
@@ -236,13 +234,14 @@ theme_adium_parse_body (EmpathyThemeAdium *theme,
"<abbr title='%s'><img src=\"%s\"/ alt=\"%s\"/></abbr>",
smiley->str, smiley->path, smiley->str);
} else {
- g_string_append (string, smiley->str);
+ ret = g_markup_escape_text (smiley->str, -1);
+ g_string_append (string, ret);
+ g_free (ret);
}
empathy_smiley_free (smiley);
}
g_slist_free (smileys);
- g_free (ret);
ret = g_string_free (string, FALSE);
}