apply patch by Dennis Craven to make & a & [see #439]

This commit is contained in:
Nikos Kouremenos 2005-06-14 10:00:29 +00:00
parent e7ff7da1da
commit 4ad77e0e14
2 changed files with 7 additions and 0 deletions

View File

@ -136,6 +136,11 @@ class GroupchatWindow(chat.Chat):
new_jid = jid
break
subject = self.subjects[new_jid]
# escape chars when necessary
subject = subject.replace('&', '&')
new_jid = new_jid.replace('&', '&')
name_label = self.name_labels[new_jid]
name_label.set_markup('<span weight="heavy" size="x-large">%s</span>\n%s' % (new_jid, subject))
chat.Chat.on_chat_notebook_switch_page(self, notebook, page, page_num)

View File

@ -98,6 +98,8 @@ class TabbedChatWindow(chat.Chat):
'''Draw the fat line at the top of the window that
houses the status icon, name, jid, and avatar'''
# this is the text for the big brown bar
# some chars need to be escaped.. this fixes '&'
name = name.replace('&', '&amp;')
label_text = '<span weight="heavy" size="x-large">%s</span>\n%s' \
% (name, jid)