[Xfce4-commits] <midori:master> Handle single, double and absent quotes in -moz-document
Christian Dywan
noreply at xfce.org
Wed Nov 3 00:18:01 CET 2010
Updating branch refs/heads/master
to 53a205be4d0683b3b17ab1606940bedc51bef561 (commit)
from cd69cdedb951836ed4a8eb8058651f444de181a3 (commit)
commit 53a205be4d0683b3b17ab1606940bedc51bef561
Author: Paweł Forysiuk <tuxator at o2.pl>
Date: Wed Nov 3 00:12:05 2010 +0100
Handle single, double and absent quotes in -moz-document
extensions/addons.c | 24 ++++--------------------
1 files changed, 4 insertions(+), 20 deletions(-)
diff --git a/extensions/addons.c b/extensions/addons.c
index 9fd2f7f..cdbc0a9 100644
--- a/extensions/addons.c
+++ b/extensions/addons.c
@@ -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
More information about the Xfce4-commits
mailing list