[Xfce4-commits] <midori:master> Fix wrong handling of URI containing space
Christian Dywan
noreply at xfce.org
Tue Nov 15 21:52:02 CET 2011
Updating branch refs/heads/master
to 5eda5a3faafb28c36a9d7c8ad975875b3521176c (commit)
from 8ecfdd701ed57ad51d6e6df8e93cba570f04601d (commit)
commit 5eda5a3faafb28c36a9d7c8ad975875b3521176c
Author: Christian Dywan <christian at twotoasts.de>
Date: Tue Nov 15 21:48:59 2011 +0100
Fix wrong handling of URI containing space
katze/midori-uri.vala | 1 +
tests/magic-uri.c | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/katze/midori-uri.vala b/katze/midori-uri.vala
index d8dd5de..4806357 100644
--- a/katze/midori-uri.vala
+++ b/katze/midori-uri.vala
@@ -102,6 +102,7 @@ namespace Midori {
/* file:// is not considered a location for security reasons */
return uri != null
&& ((uri.str ("://") != null && uri.chr (-1, ' ') == null)
+ || is_http (uri)
|| uri.has_prefix ("about:")
|| (uri.has_prefix ("data:") && uri.chr (-1, ';') != null)
|| (uri.has_prefix ("geo:") && uri.chr (-1, ',') != null)
diff --git a/tests/magic-uri.c b/tests/magic-uri.c
index a7cba6b..259802f 100644
--- a/tests/magic-uri.c
+++ b/tests/magic-uri.c
@@ -91,6 +91,8 @@ magic_uri_uri (void)
test_input ("example.com", "http://example.com");
test_input ("www.google..com", "http://www.google..com");
test_input ("/home/user/midori.html", "file:///home/user/midori.html");
+ test_input ("http://www.google.com/search?q=query test",
+ "http://www.google.com/search?q=query test");
if (sokoke_resolve_hostname ("localhost"))
{
test_input ("localhost", "http://localhost");
More information about the Xfce4-commits
mailing list