Fix wrong handling of URI containing space
This commit is contained in:
parent
8ecfdd701e
commit
5eda5a3faa
2 changed files with 3 additions and 0 deletions
|
@ -102,6 +102,7 @@ namespace Midori {
|
||||||
/* file:// is not considered a location for security reasons */
|
/* file:// is not considered a location for security reasons */
|
||||||
return uri != null
|
return uri != null
|
||||||
&& ((uri.str ("://") != null && uri.chr (-1, ' ') == null)
|
&& ((uri.str ("://") != null && uri.chr (-1, ' ') == null)
|
||||||
|
|| is_http (uri)
|
||||||
|| uri.has_prefix ("about:")
|
|| uri.has_prefix ("about:")
|
||||||
|| (uri.has_prefix ("data:") && uri.chr (-1, ';') != null)
|
|| (uri.has_prefix ("data:") && uri.chr (-1, ';') != null)
|
||||||
|| (uri.has_prefix ("geo:") && uri.chr (-1, ',') != null)
|
|| (uri.has_prefix ("geo:") && uri.chr (-1, ',') != null)
|
||||||
|
|
|
@ -91,6 +91,8 @@ magic_uri_uri (void)
|
||||||
test_input ("example.com", "http://example.com");
|
test_input ("example.com", "http://example.com");
|
||||||
test_input ("www.google..com", "http://www.google..com");
|
test_input ("www.google..com", "http://www.google..com");
|
||||||
test_input ("/home/user/midori.html", "file:///home/user/midori.html");
|
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"))
|
if (sokoke_resolve_hostname ("localhost"))
|
||||||
{
|
{
|
||||||
test_input ("localhost", "http://localhost");
|
test_input ("localhost", "http://localhost");
|
||||||
|
|
Loading…
Reference in a new issue