From: Christian Dywan Date: Thu, 4 Nov 2010 18:03:49 +0000 (+0100) Subject: Properly omit quotes from -moz-document domain X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34a3c307b5a05cc0898fd113a82df1a2dc2c719d;p=midori Properly omit quotes from -moz-document domain --- diff --git a/extensions/addons.c b/extensions/addons.c index cdbc0a98..229051f2 100644 --- a/extensions/addons.c +++ b/extensions/addons.c @@ -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