Blob Blame History Raw
From 5f07d6a0cd5c3b0c396c63c9f6f04e155dccf90a Mon Sep 17 00:00:00 2001
From: Yosef Or Boczko <yoseforb@src.gnome.org>
Date: Wed, 24 Sep 2014 12:04:47 +0300
Subject: [PATCH 02/15] ephy-title-box: Show correctly UTF-8 URL

https://bugzilla.gnome.org/show_bug.cgi?id=710004
---
 src/ephy-title-box.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/ephy-title-box.c b/src/ephy-title-box.c
index 3c4366b..2cc853a 100644
--- a/src/ephy-title-box.c
+++ b/src/ephy-title-box.c
@@ -681,13 +681,16 @@ ephy_title_box_set_address (EphyTitleBox *title_box,
                             const char *address)
 {
   EphyTitleBoxPrivate *priv;
-  EphyEmbedShellMode mode;
+  EphyEmbedShellMode   mode;
+  gchar               *decode_uri;
 
   g_return_if_fail (EPHY_IS_TITLE_BOX (title_box));
 
   priv = ephy_title_box_get_instance_private (title_box);
   mode = ephy_embed_shell_get_mode (ephy_embed_shell_get_default ());
 
+  decode_uri = g_uri_unescape_string (address, NULL);
+
   if (address == NULL || mode == EPHY_EMBED_SHELL_MODE_APPLICATION) {
     gtk_label_set_text (GTK_LABEL (priv->uri), address);
   } else {
@@ -695,8 +698,10 @@ ephy_title_box_set_address (EphyTitleBox *title_box,
     char *uri;
 
     rtl = gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL;
-    uri = g_strconcat (rtl ? "▾ " : address, rtl ? address : " ▾", NULL);
+    uri = g_strconcat (rtl ? "▾ " : decode_uri, rtl ? decode_uri : " ▾", NULL);
     gtk_label_set_text (GTK_LABEL (priv->uri), uri);
     g_free (uri);
   }
+
+  g_free (decode_uri);
 }
-- 
2.1.0