[Xfce4-commits] <midori:master> Preserve %20 for pasting URLs into other windows

Christian Dywan noreply at xfce.org
Sun Jan 30 19:00:06 CET 2011


Updating branch refs/heads/master
         to 1f08629a4f6a7e38568710bbfc3191d36aa649bf (commit)
       from 57d529d309cfdfa3ff4e1bc8564f1b8d57256429 (commit)

commit 1f08629a4f6a7e38568710bbfc3191d36aa649bf
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun Jan 30 18:43:28 2011 +0100

    Preserve %20 for pasting URLs into other windows

 midori/sokoke.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/midori/sokoke.c b/midori/sokoke.c
index 4e4aa09..0e39ce8 100644
--- a/midori/sokoke.c
+++ b/midori/sokoke.c
@@ -828,7 +828,7 @@ sokoke_magic_uri (const gchar* uri)
  * sokoke_uri_unescape_string:
  * @uri: an URI string
  *
- * Unescape @uri if needed, and pass through '+'.
+ * Unescape @uri if needed, and pass through '+' and '%20'.
  *
  * Return value: a newly allocated URI
  **/
@@ -836,7 +836,14 @@ gchar*
 sokoke_uri_unescape_string (const gchar* uri)
 {
     if (strchr (uri,'%'))
-        return g_uri_unescape_string (uri, "+");
+    {
+        /* Preserve %20 for pasting URLs into other windows */
+        gchar* unescaped = g_uri_unescape_string (uri, "+");
+        gchar* spaced = sokoke_replace_variables (unescaped, " ", "%20", NULL);
+        g_free (unescaped);
+        return spaced;
+    }
+
     return g_strdup (uri);
 }
 



More information about the Xfce4-commits mailing list