Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/buddy.c @ 27563:7a2891487a00
Don't pre-escape jbr->status. Almost every place required it in unescaped
form. The places that did want it escaped had to go through a few hoops
just to get it right, which are no longer necessary. Also, some other
places failed to take into account that it was escaped, causing other
display bugs.
Fixes #5352.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 12 Jul 2009 22:40:54 +0000 |
parents | b118127843cc |
children | a12574d982a1 |
comparison
equal
deleted
inserted
replaced
27562:834236111afc | 27563:7a2891487a00 |
---|---|
166 jb->resources = g_list_append(jb->resources, jbr); | 166 jb->resources = g_list_append(jb->resources, jbr); |
167 } | 167 } |
168 jbr->priority = priority; | 168 jbr->priority = priority; |
169 jbr->state = state; | 169 jbr->state = state; |
170 g_free(jbr->status); | 170 g_free(jbr->status); |
171 jbr->status = status != NULL ? g_markup_escape_text(status, -1) : NULL; | 171 jbr->status = g_strdup(status); |
172 | 172 |
173 return jbr; | 173 return jbr; |
174 } | 174 } |
175 | 175 |
176 void jabber_buddy_resource_free(JabberBuddyResource *jbr) | 176 void jabber_buddy_resource_free(JabberBuddyResource *jbr) |
700 char *tmp; | 700 char *tmp; |
701 char priority[12]; | 701 char priority[12]; |
702 const char *status_name = jabber_buddy_state_get_name(jbr->state); | 702 const char *status_name = jabber_buddy_state_get_name(jbr->state); |
703 | 703 |
704 if (jbr->status) { | 704 if (jbr->status) { |
705 purdy = purple_strdup_withhtml(jbr->status); | 705 purdy = g_markup_escape_text(jbr->status, -1); |
706 | 706 |
707 if (purple_strequal(status_name, purdy)) | 707 if (purple_strequal(status_name, purdy)) |
708 status_name = NULL; | 708 status_name = NULL; |
709 } | 709 } |
710 | 710 |