[Xfce4-commits] <midori:master> Check style domains for other schemes than http(s)

Christian Dywan noreply at xfce.org
Wed Nov 9 22:08:02 CET 2011


Updating branch refs/heads/master
         to 262e5c330438a497c22bc4b2d39eedc0cc10fe44 (commit)
       from 5a786354b51336537025a1284613403b5324323f (commit)

commit 262e5c330438a497c22bc4b2d39eedc0cc10fe44
Author: Christian Dywan <christian at twotoasts.de>
Date:   Wed Nov 9 21:05:17 2011 +0100

    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.

 extensions/addons.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/extensions/addons.c b/extensions/addons.c
index 076f0e9..e87ce0f 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;


More information about the Xfce4-commits mailing list