From 971b41399160c26335b7a364348ca8b929e6538a Mon Sep 17 00:00:00 2001 From: Jimmy Date: Wed, 17 Jan 2018 18:17:14 +1300 Subject: [PATCH] Greasemonkey: make *clude regexes case insensitive Sometimes I don't read specs so good. --- qutebrowser/browser/greasemonkey.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qutebrowser/browser/greasemonkey.py b/qutebrowser/browser/greasemonkey.py index 579cca82b..753d13c56 100644 --- a/qutebrowser/browser/greasemonkey.py +++ b/qutebrowser/browser/greasemonkey.py @@ -201,7 +201,8 @@ class GreasemonkeyManager(QObject): # should be treated as a (ecma syntax) regular expression. string_url = url.toString(QUrl.FullyEncoded) if pattern.startswith('/') and pattern.endswith('/'): - return re.search(pattern[1:-1], string_url) is not None + matches = re.search(pattern[1:-1], string_url, flags=re.I) + return matches is not None # Otherwise they are glob expressions. return fnmatch.fnmatch(string_url, pattern)