Escape tag names in the menu

svn: r15926
This commit is contained in:
Nick Hall 2010-09-24 19:00:26 +00:00
parent 54c9afb545
commit 3812d647e3

View File

@ -27,6 +27,7 @@ Provide tagging functionality.
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from bisect import insort_left from bisect import insort_left
from xml.sax.saxutils import escape
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -197,7 +198,7 @@ class Tags(DbGUIElement):
tag_menu += '<menuitem action="OrganizeTags"/>' tag_menu += '<menuitem action="OrganizeTags"/>'
tag_menu += '<separator/>' tag_menu += '<separator/>'
for tag_name, handle in self.__tag_list: for tag_name, handle in self.__tag_list:
tag_menu += '<menuitem action="TAG_%s"/>' % tag_name tag_menu += '<menuitem action="TAG_%s"/>' % escape(tag_name)
actions.append(('TAG_%s' % tag_name, None, tag_name, None, None, actions.append(('TAG_%s' % tag_name, None, tag_name, None, None,
make_callback(self.tag_selected_rows, handle))) make_callback(self.tag_selected_rows, handle)))