From: Christian Dywan Date: Wed, 9 Nov 2011 20:05:17 +0000 (+0100) Subject: Check style domains for other schemes than http(s) X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=262e5c330438a497c22bc4b2d39eedc0cc10fe44;p=midori 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. --- diff --git a/extensions/addons.c b/extensions/addons.c index 076f0e9c..e87ce0f9 100644 --- a/extensions/addons.c +++ b/extensions/addons.c @@ -1047,7 +1047,8 @@ css_metadata_from_file (const gchar* filename, ++end; 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); else tmp_domain = domain;