diff options
author | David Malcolm <dmalcolm@redhat.com> | 2005-12-13 04:01:50 +0800 |
---|---|---|
committer | David Malcolm <dave_malcolm@src.gnome.org> | 2005-12-13 04:01:50 +0800 |
commit | 0d72307a839fd83353fa5dd0743b9cb13689723e (patch) | |
tree | f61ebaa1b868a875eacf0a297dd4ea63f2f9c7ef /shell | |
parent | 50bc9229d375852de44e332a8af151b109ab2f92 (diff) | |
download | gsoc2013-evolution-0d72307a839fd83353fa5dd0743b9cb13689723e.tar.gz gsoc2013-evolution-0d72307a839fd83353fa5dd0743b9cb13689723e.tar.zst gsoc2013-evolution-0d72307a839fd83353fa5dd0743b9cb13689723e.zip |
escape the string when generating XML UI description of component switcher
2005-12-12 David Malcolm <dmalcolm@redhat.com>
* e-shell-window.c (setup_widgets): escape the string when generating
XML UI description of component switcher menu item, to avoid it being
non-well-formed when a translation contains a quote character. Fixes
#322001
svn path=/trunk/; revision=30760
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 7 | ||||
-rw-r--r-- | shell/e-shell-window.c | 9 |
2 files changed, 14 insertions, 2 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index e70a59deff..bee390c3a1 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,10 @@ +2005-12-12 David Malcolm <dmalcolm@redhat.com> + + * e-shell-window.c (setup_widgets): escape the string when generating + XML UI description of component switcher menu item, to avoid it being + non-well-formed when a translation contains a quote character. Fixes + #322001 + 2005-11-14 Harish Krishnaswamy <kharish@novell.com> * e-shell-settings-dialog.c: (set_dialog_size), diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c index f45d047f8c..9bfc225fa6 100644 --- a/shell/e-shell-window.c +++ b/shell/e-shell-window.c @@ -708,7 +708,7 @@ setup_widgets (EShellWindow *window) button_id = 0; xml = g_string_new(""); for (p = e_component_registry_peek_list (registry); p != NULL; p = p->next) { - char *tmp; + char *tmp, *tmp2; EComponentInfo *info = p->data; ComponentView *view = component_view_new (info->id, info->alias, button_id); @@ -732,7 +732,12 @@ setup_widgets (EShellWindow *window) info->alias, info->menu_label, info->menu_accelerator); - g_string_append_printf(xml, _("Switch to %s"), info->button_label); + tmp = g_strdup_printf (_("Switch to %s"), info->button_label); + tmp2 = g_markup_escape_text (tmp, -1); + g_string_append (xml, tmp2); + g_free (tmp2); + g_free (tmp); + tmp = bonobo_ui_util_pixbuf_to_xml (info->menu_icon), g_string_append_printf(xml, "\" pixtype=\"pixbuf\" pixname=\"%s\"/>" "</placeholder></submenu></submenu>\n", |