From 5eda5a3faafb28c36a9d7c8ad975875b3521176c Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Tue, 15 Nov 2011 21:48:59 +0100 Subject: [PATCH] Fix wrong handling of URI containing space --- katze/midori-uri.vala | 1 + tests/magic-uri.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/katze/midori-uri.vala b/katze/midori-uri.vala index d8dd5ded..48063571 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 a7cba6bd..259802f1 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"); -- 2.39.5