]> spindle.queued.net Git - midori/commitdiff
Handle single, double and absent quotes in -moz-document
authorPaweł Forysiuk <tuxator@o2.pl>
Tue, 2 Nov 2010 23:12:05 +0000 (00:12 +0100)
committerChristian Dywan <christian@twotoasts.de>
Tue, 2 Nov 2010 23:12:05 +0000 (00:12 +0100)
extensions/addons.c

index 9fd2f7fb91788d86faff99e9cf0934f04e23b019..cdbc0a988f58d7ee478ed5674d4be54a39678551 100644 (file)
@@ -830,27 +830,11 @@ css_metadata_from_file (const gchar* filename,
                          guint j;
                          gchar* domain;
 
-                         if (value[0] != '\'' && value[0] != '"')
-                         {
-                             /* Wrong syntax, abort */
-                             g_free (value);
-                             g_strfreev (parts);
-                             g_free (line);
-                             g_io_channel_shutdown (channel, false, 0);
-                             g_slist_free (*includes);
-                             g_slist_free (*excludes);
-                             *includes = NULL;
-                             *excludes = NULL;
-                             return FALSE;
-                         }
                          j = 1;
-                         while (value[j] != '\0')
-                         {
-                             if (value[j] == value[0])
-                                 break;
-                             j++;
-                         }
-                         domain = g_strndup (value + 1, j - 1);
+                         while (value[j] != '\0' && value[j] != ')')
+                             ++j;
+
+                         domain = g_strndup (value, j);
                          if (!strncmp ("http", domain, 4))
                              *includes = g_slist_prepend (*includes, domain);
                          else