Fix Dashboard for adding Gramplet crash in Slovenian (#978)

Fixes #11491
This commit is contained in:
Paul Culley 2020-01-09 11:34:15 -06:00 committed by GitHub
parent 09e89549de
commit 1a8406e2e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1473,7 +1473,7 @@ class GrampletPane(Gtk.ScrolledWindow):
plugs.sort(key=lambda x: x.name)
for plug in plugs:
action_name = valid_action_name(plug.id)
a_menuitems += menuitem % (action_name, plug.name)
a_menuitems += menuitem % (action_name, escape(plug.name))
actions.append((action_name,
make_callback(self.add_gramplet, plug.name)))
names = [gramplet.title for gramplet in self.closed_gramplets]
@ -1484,7 +1484,7 @@ class GrampletPane(Gtk.ScrolledWindow):
# 'name' could be non-ASCII when in non-English language
# action names must be in ASCII, so use 'id' instead.
action_name = valid_action_name(str(id(name)))
r_menuitems += menuitem % (action_name, name)
r_menuitems += menuitem % (action_name, escape(name))
actions.append((action_name,
make_callback(self.restore_gramplet,
name)))