From: Christian Dywan Date: Tue, 15 Nov 2011 20:48:59 +0000 (+0100) Subject: Fix wrong handling of URI containing space X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5eda5a3faafb28c36a9d7c8ad975875b3521176c;p=midori Fix wrong handling of URI containing space --- 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");