From 27bba3c318cabe8c0a08e84e9c84e3a577555798 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pawe=C5=82=20Forysiuk?= Date: Sat, 12 Feb 2011 16:04:36 +0100 Subject: [PATCH] Strip leading and trailing whitespace when parsing user scripts/ style --- extensions/addons.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extensions/addons.c b/extensions/addons.c index 74ff22c9..4cef9869 100644 --- a/extensions/addons.c +++ b/extensions/addons.c @@ -937,6 +937,7 @@ js_metadata_from_file (const gchar* filename, while (g_io_channel_read_line (channel, &line, NULL, NULL, NULL) == G_IO_STATUS_NORMAL) { + g_strstrip (line); if (g_str_has_prefix (line, "// ==UserScript==")) found_meta = TRUE; else if (found_meta) @@ -1011,6 +1012,7 @@ css_metadata_from_file (const gchar* filename, while (g_io_channel_read_line (channel, &line, NULL, NULL, NULL) == G_IO_STATUS_NORMAL) { + g_strstrip (line); if (g_str_has_prefix (line, "@-moz-document") || line_has_meta) { /* FIXME: We merely look for includes. We should honor blocks. */ if (includes) -- 2.39.5