[gnome-photos] main-toolbar: Escape markup when setting the toolbar title
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] main-toolbar: Escape markup when setting the toolbar title
- Date: Tue, 25 Jun 2013 13:26:45 +0000 (UTC)
commit f284c1e71108bbfaffc32aaf96326457726823e1
Author: Emanuele Aina <emanuele aina collabora com>
Date: Mon May 20 11:04:04 2013 +0100
main-toolbar: Escape markup when setting the toolbar title
Use g_markup_printf_escaped() to properly escape strings.
https://bugzilla.gnome.org/show_bug.cgi?id=702909
src/photos-main-toolbar.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/src/photos-main-toolbar.c b/src/photos-main-toolbar.c
index 6650c07..1c7c509 100644
--- a/src/photos-main-toolbar.c
+++ b/src/photos-main-toolbar.c
@@ -83,7 +83,7 @@ photos_main_toolbar_set_toolbar_title (PhotosMainToolbar *self)
if (!selection_mode)
{
if (active_collection != NULL)
- primary = g_strdup (photos_base_item_get_name (PHOTOS_BASE_ITEM (active_collection)));
+ primary = g_markup_printf_escaped ("%s", photos_base_item_get_name (PHOTOS_BASE_ITEM
(active_collection)));
else
{
}
@@ -103,14 +103,13 @@ photos_main_toolbar_set_toolbar_title (PhotosMainToolbar *self)
if (active_collection != NULL)
{
- primary = g_strdup_printf ("<b>%s</b> (%s)",
- photos_base_item_get_name (PHOTOS_BASE_ITEM (active_collection)),
- label);
+ primary = g_markup_printf_escaped ("<b>%s</b> (%s)",
+ photos_base_item_get_name (PHOTOS_BASE_ITEM
(active_collection)),
+ label);
}
else
{
- primary = label;
- label = NULL;
+ primary = g_markup_printf_escaped ("%s", label);
}
g_free (label);
@@ -121,7 +120,7 @@ photos_main_toolbar_set_toolbar_title (PhotosMainToolbar *self)
GObject *item;
item = photos_base_manager_get_active_object (priv->item_mngr);
- primary = g_strdup (photos_base_item_get_name (PHOTOS_BASE_ITEM (item)));
+ primary = g_markup_printf_escaped ("%s", photos_base_item_get_name (PHOTOS_BASE_ITEM (item)));
}
if (selection_mode)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]