diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/bookmarks/ephy-new-bookmark.c | 6 | ||||
-rw-r--r-- | src/bookmarks/ephy-topic-action.c | 5 |
3 files changed, 12 insertions, 6 deletions
@@ -1,5 +1,12 @@ 2004-06-14 Christian Persch <chpe@cvs.gnome.org> + * src/bookmarks/ephy-new-bookmark.c: (duplicate_dialog_construct): + * src/bookmarks/ephy-topic-action.c: (build_topics_menu): + + Escape strings before using them with markup in labels. + +2004-06-14 Christian Persch <chpe@cvs.gnome.org> + * embed/ephy-embed.c: (ephy_embed_reload): * embed/ephy-embed.h: * embed/mozilla/mozilla-embed.cpp: diff --git a/src/bookmarks/ephy-new-bookmark.c b/src/bookmarks/ephy-new-bookmark.c index aab4f5aad..35c8b4d16 100644 --- a/src/bookmarks/ephy-new-bookmark.c +++ b/src/bookmarks/ephy-new-bookmark.c @@ -297,7 +297,7 @@ duplicate_dialog_construct (GtkWindow *parent, { GtkWidget *dialog; GtkWidget *hbox, *vbox, *label, *image; - char *str, *tmp_str, *tmp_title; + char *escaped_title, *str, *tmp_str, *tmp_title; /* FIXME: We "should" use gtk_message dialog here * but it doesn't support markup of text yet @@ -333,11 +333,13 @@ duplicate_dialog_construct (GtkWindow *parent, label = gtk_label_new (NULL); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); - tmp_title = g_strconcat ("<b>", title, "</b>", NULL); + escaped_title = g_markup_escape_text (title, -1); + tmp_title = g_strconcat ("<b>", escaped_title, "</b>", NULL); tmp_str = g_strdup_printf (_("A bookmark titled %s already exists for this page."), tmp_title); str = g_strconcat ("<big>", tmp_str, "</big>", NULL); gtk_label_set_markup (GTK_LABEL (label), str); + g_free (escaped_title); g_free (tmp_title); g_free (tmp_str); g_free (str); diff --git a/src/bookmarks/ephy-topic-action.c b/src/bookmarks/ephy-topic-action.c index dad2e73d9..f0b40d5da 100644 --- a/src/bookmarks/ephy-topic-action.c +++ b/src/bookmarks/ephy-topic-action.c @@ -343,7 +343,7 @@ sort_topics (gconstpointer a, gconstpointer b) static GtkWidget * build_topics_menu (EphyTopicAction *action, EphyNode *node) { - GtkWidget *menu, *item, *label; + GtkWidget *menu, *item; GPtrArray *children; int i; EphyBookmarks *bookmarks; @@ -388,9 +388,6 @@ build_topics_menu (EphyTopicAction *action, EphyNode *node) item = gtk_image_menu_item_new_with_label (title); - label = gtk_bin_get_child (GTK_BIN (item)); - gtk_label_set_use_markup (GTK_LABEL (label), TRUE); - gtk_widget_show (item); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); |