[epiphany] window-commands: Escape URL in web app dialog
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] window-commands: Escape URL in web app dialog
- Date: Sat, 8 Oct 2016 21:13:07 +0000 (UTC)
commit 70d302211f212938e6e481f5a587a28b5143c2ef
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Oct 8 16:11:11 2016 -0500
window-commands: Escape URL in web app dialog
For the markup parser. Else the dialog will breaks on URLs that include
characters like &
src/window-commands.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/window-commands.c b/src/window-commands.c
index 71b27f4..9654735 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -943,6 +943,7 @@ window_cmd_save_as_application (GSimpleAction *action,
GdkPixbuf *pixbuf;
GtkStyleContext *context;
char *markup;
+ char *escaped_address;
embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
@@ -985,10 +986,12 @@ window_cmd_save_as_application (GSimpleAction *action,
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
gtk_box_pack_start (GTK_BOX (box), entry, FALSE, FALSE, 0);
- markup = g_strdup_printf ("<small>%s</small>", ephy_web_view_get_display_address (view));
+ escaped_address = g_markup_escape_text (ephy_web_view_get_display_address (view), -1);
+ markup = g_strdup_printf ("<small>%s</small>", escaped_address);
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), markup);
g_free (markup);
+ g_free (escaped_address);
gtk_box_pack_end (GTK_BOX (box), label, FALSE, FALSE, 0);
context = gtk_widget_get_style_context (label);
gtk_style_context_add_class (context, "dim-label");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]