Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Wed, 10 Aug 2016 01:00:56 UTC Commit: 2499b96ea1d1eb523733c95e7ec73af827b6032e https://github.com/geany/geany/commit/2499b96ea1d1eb523733c95e7ec73af827b603...
Log Message: ----------- Escape format arguments passed to ui_label_set_markup()
Modified Paths: -------------- src/ui_utils.c
Modified: src/ui_utils.c 10 lines changed, 3 insertions(+), 7 deletions(-) =================================================================== @@ -2835,7 +2835,7 @@ void ui_label_set_markup(GtkLabel *label, const gchar *format, ...) gchar *text;
va_start(a, format); - text = g_strdup_vprintf(format, a); + text = g_markup_vprintf_escaped(format, a); va_end(a);
gtk_label_set_text(label, text); @@ -2896,7 +2896,7 @@ void ui_menu_add_document_items_sorted(GtkMenu *menu, GeanyDocument *active, GtkWidget *menu_item, *menu_item_label, *image; GeanyDocument *doc; guint i, len; - gchar *base_name, *label; + gchar *base_name; GPtrArray *sorted_documents;
len = (guint) gtk_notebook_get_n_pages(GTK_NOTEBOOK(main_widgets.notebook)); @@ -2930,11 +2930,7 @@ void ui_menu_add_document_items_sorted(GtkMenu *menu, GeanyDocument *active, gtk_widget_set_name(menu_item_label, document_get_status_widget_class(doc));
if (doc == active) - { - label = g_markup_escape_text(base_name, -1); - ui_label_set_markup(GTK_LABEL(menu_item_label), "<b>%s</b>", label); - g_free(label); - } + ui_label_set_markup(GTK_LABEL(menu_item_label), "<b>%s</b>", base_name);
g_free(base_name); }
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).