Check style domains for other schemes than http(s)

The latest libSoup versions transparently opens file:// URLs
as directory listings and there may be more.
This commit is contained in:
Christian Dywan 2011-11-09 21:05:17 +01:00
parent 5a786354b5
commit 262e5c3304

View file

@ -1047,7 +1047,8 @@ css_metadata_from_file (const gchar* filename,
++end; ++end;
domain = g_strndup (value + begin, end - begin * 2); domain = g_strndup (value + begin, end - begin * 2);
if (strncmp ("http", domain, 4)) if (!midori_uri_is_location (domain)
&& !g_str_has_prefix (domain, "file://"))
tmp_domain = g_strdup_printf ("http://*%s/*", domain); tmp_domain = g_strdup_printf ("http://*%s/*", domain);
else else
tmp_domain = domain; tmp_domain = domain;