]> spindle.queued.net Git - midori/commitdiff
Properly omit quotes from -moz-document domain
authorChristian Dywan <christian@twotoasts.de>
Thu, 4 Nov 2010 18:03:49 +0000 (19:03 +0100)
committerChristian Dywan <christian@twotoasts.de>
Thu, 4 Nov 2010 18:03:49 +0000 (19:03 +0100)
extensions/addons.c

index cdbc0a988f58d7ee478ed5674d4be54a39678551..229051f227d06b0e770baeaf0ed39679f2acd150 100644 (file)
@@ -827,14 +827,15 @@ css_metadata_from_file (const gchar* filename,
                          value = g_strdup (parts[i] + strlen ("url("));
                     if (value)
                     {
-                         guint j;
+                         guint begin, end;
                          gchar* domain;
 
-                         j = 1;
-                         while (value[j] != '\0' && value[j] != ')')
-                             ++j;
+                         begin = value[0] == '"' || value[0] == '\'' ? 1 : 0;
+                         end = 1;
+                         while (value[end] != '\0' && value[end] != ')')
+                             ++end;
 
-                         domain = g_strndup (value, j);
+                         domain = g_strndup (value + begin, end - begin * 2);
                          if (!strncmp ("http", domain, 4))
                              *includes = g_slist_prepend (*includes, domain);
                          else